FlowLayout.java (layoutContainer): Let components assume their preferred height.
2003-12-19 Thomas Fitzsimmons <fitzsim@redhat.com> * java/awt/FlowLayout.java (layoutContainer): Let components assume their preferred height. Centre components vertically. From-SVN: r74844
This commit is contained in:
committed by
Thomas Fitzsimmons
parent
26392535a7
commit
a0687c1fbc
@@ -214,7 +214,8 @@ public class FlowLayout implements LayoutManager, Serializable
|
||||
if (comps[k].visible)
|
||||
{
|
||||
Dimension c = comps[k].getPreferredSize ();
|
||||
comps[k].setBounds (x, y, c.width, new_h);
|
||||
comps[k].setBounds (x, y + (new_h - c.height) / 2,
|
||||
c.width, c.height);
|
||||
x += c.width + hgap;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user