• Post Reply Bookmark Topic Watch Topic
  • New Topic

Close a JDialog?

 
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: 24213
35
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!