This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: small FlowLayout fixes
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 19 Dec 2003 14:35:13 -0500
- Subject: Patch: FYI: small FlowLayout fixes
Hello,
I'm committing this patch to the trunk. It fixes some minor FlowLayout
issues.
Tom
2003-12-19 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/FlowLayout.java (layoutContainer): Let components
assume their preferred height. Centre components vertically.
Index: java/awt/FlowLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/FlowLayout.java,v
retrieving revision 1.10
diff -u -r1.10 FlowLayout.java
--- java/awt/FlowLayout.java 8 Oct 2003 23:38:44 -0000 1.10
+++ java/awt/FlowLayout.java 19 Dec 2003 19:20:41 -0000
@@ -214,7 +214,8 @@
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;
}
}