Results 1 to 1 of 1
Thread: Sharing data between two JFrames
- 05-09-2011, 08:59 AM #1Member
- Join Date
- May 2011
- Rep Power
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 09:05 AM.
- By PrinceSendai in forum AWT / SwingReplies: 3Last Post: 10-17-2010, 02:51 AM
- By mordjah in forum New To JavaReplies: 1Last Post: 09-22-2010, 07:29 PM
- By newicons in forum New To JavaReplies: 5Last Post: 06-26-2010, 02:55 PM
- By jyovasinedu in forum Advanced JavaReplies: 1Last Post: 11-02-2007, 08:56 AM
- By Ed in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 04:41 AM