Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Making the UI disappear after clicking a JButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Making the UI disappear after clicking a JButton" Watch "Making the UI disappear after clicking a JButton" New topic
Author

Making the UI disappear after clicking a JButton

sampath surineni
Greenhorn

Joined: Apr 02, 2012
Posts: 29

I am working on a alarm application. I want my ui to disappear when user clicks the JButton and run in the background. Can you tell me how to do this.

Thank you
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

Call setVisible(false) on the frame.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
sampath surineni
Greenhorn

Joined: Apr 02, 2012
Posts: 29

Rob Spoor wrote:Call setVisible(false) on the frame.

thank you
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

You're welcome.
 
Consider Paul's rocket mass heater.
 
subject: Making the UI disappear after clicking a JButton