Results 1 to 3 of 3
Thread: Saving JFrame
- 05-30-2011, 01:58 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 83
- Rep Power
- 0
- 05-30-2011, 02:05 AM #2
You can use the Serializable interface and the ObjectInputStream (Output) classes. Or you can simply use FileWriter to write String representations of your data to a file.
Either way try googling an IO tutorial.
- 06-01-2011, 03:19 PM #3
Member
- Join Date
- May 2011
- Posts
- 10
- Rep Power
- 0
I would take the information you want to save and print/write it to a text file.
The getUser() method being the return method which returns the values from the JFrame. You would have to do this for each variable/item individually though. Unless they are supposed to be in a group.Java Code:public void addUser() throws IOException { if (usern.equals(null)) usern = getUser(); NamesOutput.println(usern); NamesOutput.close(); }
Like... DataOutput.println(usern +" "+ userj);
Similar Threads
-
Saving JFrame
By loopsnhoops in forum New To JavaReplies: 5Last Post: 05-27-2011, 03:51 AM -
to pass a parameter from a jframe children to its jframe mother
By anix in forum NetBeansReplies: 5Last Post: 06-14-2010, 06:10 PM -
Passing data from one JFrame to another JFrame. - need help.
By Unsub in forum New To JavaReplies: 6Last Post: 04-12-2010, 11:33 AM -
How to make a Jframe un-focusable when another Jframe is active?
By Robert_85 in forum Advanced JavaReplies: 4Last Post: 04-22-2009, 11:02 PM -
Saving JFrame
By jralexander in forum New To JavaReplies: 7Last Post: 12-03-2008, 09:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks