Reputation: 2552
I've made a Menu bar and when i click on Help>>about a popup window jumps. i also put on the popup window a button and i'm wondering what's the command i should use to close the popup window in the button action listener but not abort the program. (i tried before to use (System.exit(0)) but it's abort the program.
Upvotes: 0
Views: 50
Reputation: 324197
i'm wondering what's the command i should use to close the popup window
You would use:
window.dispose();
Or better yet just use a JOptionPane
to display the "About" dialog. The JOptionPane
will build the dialog and buttons for you.
Check out the section from the Swing tutorial on How to Make Dialogs for more information and examples.
Upvotes: 6