I have a small JButton window that pops up at a certain moment in my program. How do I make it so that the small window closes automatically after I click any of the two JButtons in it?
Printable View
I have a small JButton window that pops up at a certain moment in my program. How do I make it so that the small window closes automatically after I click any of the two JButtons in it?
What is a "JButton window"? It sounds like you're showing a dialog window of some type, say a JDialog or JOptionPane, and you can make it close by calling setVisible(false) or dispose() on the dialog.