Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Java Swing | Using CardLayout v/s Hiding components

Posted on 2002-05-02
4
318 Views
Last Modified: 2008-03-10
Hi,

We are developing an applet where we need to navigate from one screen to many other screens.

We have two options to achieve this:
1. Use a Card Layout and Flip the panels according to the navigation.
2. Assign Component Index to the Panels while adding to a Main Panel and then hide or show (setVisible) the panels according to the navigation.

Which would be an appropriate approch ?

thanks
anoop
0
Comment
Question by:anooprajr
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 6987684
I'd recomend using CardLayout, simpler and less prone to error.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 6987897
CardLayout
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7992945
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: objects
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 

Expert Comment

by:SpideyMod
ID: 8048427
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question