Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Terminate an application

 
Dirk Trompetter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I terminate an application by selecting a menu entry, for example "Quit"?
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.exit() is what you need. You will need to put this in the actionEvent of clicking that menu item.
Bosun
 
Mindy Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should that be System.exit(0)?
 
Dirk Trompetter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, it works.
Originally posted by Mindy Wu:
Should that be System.exit(0)?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic