diff options
author | Thomas Fitzsimmons <fitzsim@redhat.com> | 2003-12-19 20:11:56 +0000 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@gcc.gnu.org> | 2003-12-19 20:11:56 +0000 |
commit | a0687c1fbcf51f8aec14b4bcbbf4cdd7c111be2c (patch) | |
tree | 3354549e9f986afaa0f412dba94cd2139cdbffaf /libjava | |
parent | 26392535a78d2e396cff24391be6f4920c632e2b (diff) | |
download | gcc-a0687c1fbcf51f8aec14b4bcbbf4cdd7c111be2c.zip gcc-a0687c1fbcf51f8aec14b4bcbbf4cdd7c111be2c.tar.gz gcc-a0687c1fbcf51f8aec14b4bcbbf4cdd7c111be2c.tar.bz2 |
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
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/awt/FlowLayout.java | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8db6d73..a50b34e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-12-19 Thomas Fitzsimmons <fitzsim@redhat.com> + + * java/awt/FlowLayout.java (layoutContainer): Let components + assume their preferred height. Centre components vertically. + 2003-12-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/ChannelInputStream.java: New file. diff --git a/libjava/java/awt/FlowLayout.java b/libjava/java/awt/FlowLayout.java index d26b8d1..98d7494 100644 --- a/libjava/java/awt/FlowLayout.java +++ b/libjava/java/awt/FlowLayout.java @@ -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; } } |