Hi
It is difficult to explain my problem. I have 2 classes. 1 is called System and the other Phonebook. There is a button called phonebookButton on a frame which a have created in the System class. When you press the button, I create an Object of the Phonebook class(Phonebook phone = new Phonebook() ). I then disable the button(phonebookButton.setEnabled(false) so you can't press it again. Works perfectly. Thats the easy part.
When you press the button another frame opens up. I have a Window Listener on the frame. What i want to happen now is when you close the frame(click on the X in the corner of the frame) the button from the System frame must be enabled again.
I tried this when you close the Phonebook frame:
System sys = new System();
sys.phonebookButton.setEnabled(true);
Any help would be appreciated
Thanks