Hm, patch attached now...

+--- Kero --------------------------------- [EMAIL PROTECTED] ---+
|  Don't split your mentality without thinking twice       |
|                          Proud like a God -- Guano Apes  |
+--- M38c ------------------ http://huizen.dds.nl/~kero ---+
--- libraries/javalib/java/awt/oldGridLayout.java       Thu Mar 22 00:30:16 2001
+++ libraries/javalib/java/awt/GridLayout.java  Thu Mar 22 00:40:37 2001
@@ -108,13 +108,14 @@
 }
 
 public void layoutContainer ( Container parent) {
+       int nChildren = parent.getComponentCount(); // beware of Frame Menubars
+       if (nChildren == 0) return;
+
        Insets in = parent.getInsets(); // getInsets() might be reimplemented (swing)
        int tw = parent.width - in.left - in.right - hgap;
        int th = parent.height - in.top - in.bottom - vgap;
        
-       Dimension d = adjustDim( parent);
-       int nChildren = parent.getComponentCount(); // beware of Frame Menubars
-       
+       Dimension d = adjustDim( parent); // #rows & #columns
        int cw = tw / d.width;
        int ch = th / d.height;
        

Reply via email to