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

What is math exp in java?

559


What does percent mean in java?

604


How java enabled high performance?

597


Explain the access modifiers for a class, method and variables?

676


What is slash r?

551






Is it possible to write a regular expression to check if string is a number?

556


How do you use compareto in java?

575


Explain differences between collection api and stream api?

623


Differentiate between stringbuffer and string?

607


List the different types of classloaders in java.

517


What is the point of java?

566


Can we assign integer value to char in java?

520


How does indexof work?

525


What is singletonlist in java?

521


What advantage do java's layout managers provide over traditional windowing systems?

558