Is this your first time here? SwingWiki is a Java Swing Developer community site with an big archive of Swing-related usenet groups and mailing lists, but also tips, tricks and articles and book reviews written by your colleagues from around the world. If you came here through a search engine and did not find what you were looking for, make sure to check the wiki table of contents.

Modify preferred size of components when changing minimal size

Remember that the preferred size of components is used, if the size is never changed (for example, using layouts).

It is not straightforward, but minimal size is not checked when you put a component into a BorderLayout left position, for example. Create an empty panel, define non-zero minimal size of that panel, put it there, and the panel will still not be displayed.

So, when changing minimal size, always update also the preferred size of the panel.


Comments? Corrections? Contact us or Login to edit pages directly (registration is free and takes less than displaying a JLabel)
  best/modify_preferred_size.txt · Last modified: 2005/02/13 12:17
Recent changes | RSS changes | Table of contents | News Archive | Terms And Conditions | Register | The Quest For Software++| Ruby Resources

Sedo - Buy and Sell Domain Names and Websites project info: Statistics for project etracker� web controlling instead of log file analysis