This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Close a JDialog?  RSS feed

 
Fiona Healy
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies for asking such a trivial question but how do you close a JDialog box from the actionPerformed event of a Jbutton
System.exit(0) wont do as it closes the entire application all i want is for the JDialog to close.

Cheers Fiona
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can either call the dialog object's dispose() method to throw it away altogether, or call setVisible(false) on it if you want to reuse the dialog later.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!