Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setDefaultCloseOperation on a JFrame

 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic