• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Default closing?

 
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!