tags:

views:

40

answers:

2

So I want to have an "Exit" option on my menubar, NP. The JFrame already has the DISPOSE_ON_CLOSE in it's setDefaultCloseOperation method. I've looked around and have yet to find what I believe is a good example... What's a good or right way? A little help please!

As Always...

A: 

You probably want to do someFrame.dispose ()

Roman
+1  A: 

Add the ExitAction to your Exit menu item. It will react just like the user clicke the "close" button on the frame. The rest of the article really isn't applicable to your requirement.

camickr
I followed the example you pointed to (http://tips4java.wordpress.com/2009/05/01/closing-an-application/). It's working as I'd like and I appreciate the help.
Dennis S