This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: AWT fixlet


I'm checking this in.

This fixes an AWT bug I ran into last night.  I'm only checking this
in on the trunk.  Since AWT isn't going to be a supported feature on
the branch, I think there's no point changing it there.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* java/awt/GridLayout.java (layoutContainer): Handle case where
	there are no items in container.

Index: java/awt/GridLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/GridLayout.java,v
retrieving revision 1.6
diff -u -r1.6 GridLayout.java
--- java/awt/GridLayout.java 2002/01/29 16:31:24 1.6
+++ java/awt/GridLayout.java 2002/03/10 18:12:02
@@ -152,6 +152,12 @@
   public void layoutContainer (Container parent)
   {
     int num = parent.ncomponents;
+
+    // There's no point, and handling this would mean adding special
+    // cases.
+    if (num == 0)
+      return;
+
     // This is more efficient than calling getComponents().
     Component[] comps = parent.component;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]