posted 21 years ago
I have a JFrame with 2 buttons namely button1 & button2. The primary role of button1 & button2 is to open-up a dailog to open & save documents.
1.) button1 should open the file and append it to my JTextArea.
2.) button2 should save everything on my JTextArea.
Before they can do this, I need to pass my 2 methods which are openFile() and openSave() to my button1 & button2 Action Listner.
My problem is that I cant seem to open and save files on my JTextArea. Can anyone pls, look if I forgot something or there is an error. If you may can you tweak my codes so that I can do opening & saving on my documents.
Thank you . . .
Here's the process >>>
button1.ActionListner {
openFile();
}
button2.ActionListner {
openSave();
}
Here's my codes :