This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unloading a frame

 
Richard Mendoza
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a frame and in it is a button named close. What I want I want is if I click on the button, it should unload the frame (not to terminate the whole program). What should I do? What command should I put on the actionPerformed method of the button?
Can anybody help me? Thanks!

Richard
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<frame object>.hide() or <frame object>.setVisible(false)
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hide or setVisible(false) will not free the resources used by the frame; they're a good choice if you're going to later show the frame again. Otherwise, use frame.dispose() to get rid of the frame altogether.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic