• Post Reply Bookmark Topic Watch Topic
  • New Topic

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); but instead of JFrame I want Frame.  RSS feed

 
Joseph Alrawi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want my window to close, but the problem is if I set

Eclipse tells me EXIT_ON_CLOSE cannot be resolved to variable or is not in a field. I've already imported Frame in my code since I think JFrame messed it up a little for me. What is the difference between those 2? Does it matter which one I use? And how do I exit application on close with a normal Frame?

Thanks!

(Here's my whole code)

 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You got an answer to this question in your last question.
 
Joseph Alrawi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:You got an answer to this question in your last question.


No I did not. If you read closely you can see the difference, I asked what is wrong with my loop, it was suggested that I use Frame instead of JFrame, then nothing else happened what so ever. This is also different to what I've asked.
 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also asked about EXIT_ON_CLOSE.

Read all the answers given, not just the ones on your original question.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!