Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Default closing?  RSS feed

 
Yatin Shah
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir,

Anyone can tell me how can I handle event on Default Closing. My problem is that I have been created three JButton. If user click any of these, all are setEnabled(false) until that frame has been closed. But, if user will close with default closing button than, all should become setEnabled(true), but its not working still they are setEnabled(false).

Thanking You
Yatin
 
Leena Borle
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yatin,
You can add a WindowListener on your frame. See this on Sun's tutorial

http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html

Leena
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!