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
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.
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.
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