aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes setDefaultCloseOperation on a JFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "setDefaultCloseOperation on a JFrame" Watch "setDefaultCloseOperation on a JFrame" New topic
Author

setDefaultCloseOperation on a JFrame

ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
I have the following section of code. I've gotten this before and solved it by having my class extend JFrame. This time I don't want to do that...
Here is the fragment

When the above code tries to compile, I get the error:
Cannot resolve symbol EXIT_ON_CLOSE.
Anyone know whats up?


Ryan Headley<br /><a href="http://www.sudovi.com" target="_blank" rel="nofollow">http://www.sudovi.com</a>
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Ryan,
I believe that EXIT_ON_CLOSE is a static member of JFrame. Therefore, if you do NOT extend JFrame, you probably need to use the fully qualified name, i.e., JFrame.EXIT_ON_CLOSE.
Hope this helps.
Stephanie
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
Thanx Steph...i can call ya "Steph" can't i??
That worked great...thanx a billion! Can't believe I didn't figure that out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setDefaultCloseOperation on a JFrame