The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 (Not So) Stupid Questions 6: Comparability of Minimum, Maximum Dimensions
Subject:  Text component layout
Date:  2005-11-24 08:57:43
From:  tackline


Yes. It is "minimum size" in a rather awkward sense. Not that minimum size is often useful.

The preferred size of text components can also change depending upon its current size, IIRC. The AWT layout system isn't really up to laying out flowing text. What tends to happen is that the layout is calculated and displayed, then as widths change it all happens a second time shortly after. That layout seems to turn out alright in the end, it just doesn't look very professional as it shudders. If you write your own text-like components, calling revalidate when width changes effect the preferred height should give the same effect.


 Feed java.net RSS Feeds