Hi,
This has been eating me in and out. I will give the code here you can try it out. Sorry it might be a little long/boring.
I first draw a GUI with a button. This is done by 'GUIDrawer'. I start it as a
thread so that EDT will not be blocked. And when you click the '
TEST' button, I want to pop up a frome with YES and NO, and according to user click, the
string 'password' will be changed.
The problem is, I want to check the value of 'password' 'after' the user had clicked the button. So I have put in wait()/notify() statements (Thanks to Norm).
But the problem is, no matter what I do or how many threads I start, I cannot get the YES and NO buttons on the passwordFrame. It gives me the frame but not the buttons. If I take off the wait() statement I get the buttons. I'm a litle baffled as to why it gives me the frame but I do not getthe buttons? GUITester is the class associated with the TEST button. Which calls the GetPassword thread and wait(). If you comment the monitor.wait() statement in the GUITester class you can see that the passwordFrame gives the buttons. Otherwise no buttons (only frame).
Any help will be greatly appreciated. Thank you.
[ August 02, 2008: Message edited by: Maduranga Liyanage ]
[ August 02, 2008: Message edited by: Maduranga Liyanage ]
[ August 02, 2008: Message edited by: Maduranga Liyanage ]