This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes show() and setVisible() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "show() and setVisible()" Watch "show() and setVisible()" New topic

show() and setVisible()

Tom Tang
Ranch Hand

Joined: Dec 24, 2000
Posts: 133
According to Khalid, the difference between the two methods for a window component is that show() will bring the component to the front of any other windows, but setVisible won't. I tried the following code and found the window will always appear in front of any other windows(bring up different windows and try). Can someone explain more.

Sun Certified Java Programmer
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: show() and setVisible()
Similar Threads
Problem in Menu, from RHE
Menu Bar
sub menus...
how to control components of another window