Submitted On 01-FEB-2005
jessewilson
I think I have a workaround:
If you call setBounds() with your preferred width and some maximum height, I believe the preferred height will automatically be what you would expect. You could then use this value to set the min and max height if necessary.
Submitted On 09-MAR-2006
Carsten.Drossel
I always use this workaround:
component.setPreferredSize( new Dimension( newWidth, component.getPreferredSize().height ) );
and yes, I would definitely appreciate a setPreferredWidth()-method
Submitted On 05-SEP-2006
BinaryDigit
I agree, and also I think all the setXXXSize() methods should have a version that takes int,int instead of a Dimension.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|