aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2003-12-19 20:11:56 +0000
committerThomas Fitzsimmons <fitzsim@gcc.gnu.org>2003-12-19 20:11:56 +0000
commita0687c1fbcf51f8aec14b4bcbbf4cdd7c111be2c (patch)
tree3354549e9f986afaa0f412dba94cd2139cdbffaf /libjava
parent26392535a78d2e396cff24391be6f4920c632e2b (diff)
downloadgcc-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/ChangeLog5
-rw-r--r--libjava/java/awt/FlowLayout.java3
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;
}
}