What is the preferred size of a component?

Answer Posted / ranganathkini

When frames or containers are designed using layout
managers, each layout manager imposes certain rules on how
the components within the container must be placed and
sized. Components cannot impose their required size on the
layout manager hence they use the "preferred size" attribute
to suggest to the layout manager of what wud be the ideal
size/location to display them.

The layout manager looks at the preferred size requested by
the components while laying them out in the container. If
the preferred size can be given to the component without
violating the layout manager's rules then the layout manager
uses the preferred size for that component.

Is This Answer Correct ?    37 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you sort in java?

590


Can we convert integer to string in java?

590


What is string intern in java?

545


What is the difference between replace and replace all?

469


Is java good for beginners?

578






How do you generate random numbers in java?

509


What is the collections api in java programming?

547


How many tetrahedral voids are there in bcc?

541


Explain about exception propagation?

583


Does java set allow duplicates?

523


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

651


a thread is runnable, how does that work? : Java thread

505


What are different types of constants?

514


How do you represent a space in regex java?

513


What is java beans?

568