What is CardLayout?

Answer Posted / modi[achir communication]

A CardLayout object is a layout manager for a container. It
treats each component in the container as a card. Only one
card is visible at a time, and the container acts as a stack
of cards. The first component added to a CardLayout object
is the visible component when the container is first displayed.

The ordering of cards is determined by the container's own
internal ordering of its component objects. CardLayout
defines a set of methods that allow an application to flip
through these cards sequentially, or to show a specified
card. The addLayoutComponent(java.awt.Component,
java.lang.Object) method can be used to associate a string
identifier with a given card for fast random access.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null a keyword in java?

557


How do singleton patterns work?

517


How can you set the applet size?

576


What are user defined exceptions?

589


What is vector capacity in java?

597






What is method with example?

582


How to sort array in descending order in java?

514


What is the purpose of java?

558


How to perform binary search in java?

574


What is a bubble sort in java?

547


What if I write static public void instead of public static void in java?

579


In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

839


What is the difference between exception and error in java?

493


What steps are taken when the OS shifts from one-thread execution to another?

902


What is meant by design patterns?

587