Forums Register Login

Close a JDialog?

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
Get out of my mind! Look! A tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 941 times.
Similar Threads
prevent close of JDialog except thru my button
JDialog Dilemma I Have
urgent please help
Regarding JDialog
Disabling The Maximize Box And The Close Box
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:07:25.