Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

getPreferredSize

What determines/changes the "preferred size?"
0
menubar
Asked:
menubar
1 Solution
 
smileyxxCommented:
If you subclass Component, you can do it yourself by overriding the getPreferredSize() method.
0
 
superschlonzCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now