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

What is the purpose of file class?

538


What is the use of default method in interface in java?

543


What is the default value of an object reference declared as an instance variable?

527


Can you run java program without main method?

537


what are three ways in which a thread can enter the waiting state? : Java thread

568






What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

616


What is the final keyword in java?

543


Does list maintain insertion order java?

527


What class allows you to read objects directly from a stream?

851


What is the difference between Array and Hash Table?

533


Is this valid in java ? Can we instantiate interface in java?

537


describe method overloading

528


Can a abstract class be defined without any abstract methods?

546


How can you handle java exceptions?

517


What is function declaration?

519