Next Generation Emulation banner
1 - 10 of 10 Posts

· Registered
Joined
·
49 Posts
Discussion Starter · #1 · (Edited)
i have a project i need to deliver soon but i haven't figured a way to save the radiobuttons state to a file... i need this because when i load the file to see the information the radiobuttonsaren't selected
please submit a code sample
 

· Registered
Joined
·
59 Posts
What I was thinking about was like storing a number in the file, say 1..2..3..N
then have an array of radio buttons or something like that and the number in the file would be the radio button index that is selected, this is just off the top of my head, not sure if it will actually be able to be done the way your doing it.
 

· Emulation to the max!
Joined
·
2,624 Posts
I agree, can't you just store it with tokens so like radiobutton1*1*radiobutton2*0* to state whether they are off or on then use a loop to read the file and apply the states to the buttons?
 

· Registered
Joined
·
839 Posts
You guys are making this much much more difficult than it has to be. If you simply serialize the radio button you save yourself alot of code and pain. Most, if not all, window controls in Java can be serialized to any Java stream. This means simply writing the radio button control to a stream by simply calling its writeObject method and passing the stream to it.
 

· Memories are all I have..
Joined
·
426 Posts
o_O ya can serilize the radio button and write it into a file right?
just as zeno said...
or maybe if your not too sure how to do it, you can just simply write a short line in your text file to designate the radio button changes
 
1 - 10 of 10 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top