Solved

getPreferredSize

Posted on 2001-06-08
2
156 Views
Last Modified: 2010-03-31
What determines/changes the "preferred size?"
0
Comment
Question by:menubar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 69
servlet and mdb, jms error 1 83
Java basic valueOf question 1 51
Java import explained 4 49
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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 will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

752 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