Results 1 to 1 of 1
  1. #1
    patriotsfan is offline Member
    Join Date
    May 2011
    Rep Power

    Default Sharing data between two JFrames

    I have a program that is working that currently reads data from a .txt file, then saves to an arraylist which then that data is shown in a JListBox and also JTextFields. The user clicks a button to add new data entry and it currently uses JOptionPane to collect data. I want to change this. I have created a second form that opens when JButton clicked but I need help with communicating the data back to the arraylist/.txt file. I am wondering how should I make this work? Do I try to save data to the .txt file or the arraylist? The input fields are Two string input and 3 integer which makes up one object. Also I do have a method to write the data to the Text File from JFrame1 but not the JFrame2(The one that opens when button clicked).
    Last edited by patriotsfan; 05-09-2011 at 10:05 AM.

Similar Threads

  1. Sharing Data Members between two JFrames
    By PrinceSendai in forum AWT / Swing
    Replies: 3
    Last Post: 10-17-2010, 03:51 AM
  2. Sharing data between instances of an application
    By mordjah in forum New To Java
    Replies: 1
    Last Post: 09-22-2010, 08:29 PM
  3. Help: passing data from multiple JFrames
    By newicons in forum New To Java
    Replies: 5
    Last Post: 06-26-2010, 03:55 PM
  4. sharing of data between sites
    By jyovasinedu in forum Advanced Java
    Replies: 1
    Last Post: 11-02-2007, 09:56 AM
  5. 2 threads sharing a data base connection
    By Ed in forum Advanced Java
    Replies: 2
    Last Post: 07-04-2007, 05:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts