File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes how to switch between panel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to switch between panel?" Watch "how to switch between panel?" New topic

how to switch between panel?

Tiny Star

Joined: Jul 29, 2002
Posts: 16
if a frame contains many panels then use what method to switch between them?
is that hide one and show another?
use setVisible(boolean) or somewhat ?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

"tinystar" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Look into using CardLayout... it manages a lot of this stuff for you...
Thanks! and welcome to the JavaRanch!
[ September 23, 2002: Message edited by: Nathan Pruett ]

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: how to switch between panel?
It's not a secret anymore!