Solved

getPreferredSize

Posted on 2001-06-08
2
151 Views
Last Modified: 2010-03-31
What determines/changes the "preferred size?"
0
Comment
Question by:menubar
2 Comments
 

Expert Comment

by:smileyxx
ID: 6168984
If you subclass Component, you can do it yourself by overriding the getPreferredSize() method.
0
 
LVL 3

Accepted Solution

by:
superschlonz earned 20 total points
ID: 6169397
Components should calculate their preferred size from the text and other stuff they display.
Containers have a Layout which calculates the preferred size from the values the components in
this container return.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
strCopies  challenge 17 74
mapAB Challlenge 35 89
Modeling a class in java 5 34
What is the latest versions eclipse neon 2 123
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now