GridLayout.java (setColumns): Check newCols, not cols.
authorTom Tromey <tromey@redhat.com>
Sun, 10 Nov 2002 17:35:13 +0000 (17:35 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sun, 10 Nov 2002 17:35:13 +0000 (17:35 +0000)
* java/awt/GridLayout.java (setColumns): Check newCols, not cols.
(setRows): Check newRows, not rows.

From-SVN: r58984

libjava/ChangeLog
libjava/java/awt/GridLayout.java

index 3024eb0f3aa7221a77559667b05b0b09d4f675d5..b2a035a0549c4c83cf7745cbd1da7547461a8d1e 100644 (file)
@@ -1,5 +1,8 @@
 2002-11-10  Tom Tromey  <tromey@redhat.com>
 
+       * java/awt/GridLayout.java (setColumns): Check newCols, not cols.
+       (setRows): Check newRows, not rows.
+
        * jni.cc (_Jv_GetJNIEnvNewFrame): Set env->ex in all cases.
 
 2002-11-09  Tom Tromey  <tromey@redhat.com>
index 58145f8cb00a8baccd4d681a58ee81e714cfc018..51e012a4cd7f4e46a2d9271bffd3833d044a73f4 100644 (file)
@@ -245,7 +245,7 @@ public class GridLayout implements LayoutManager, Serializable
    */
   public void setColumns (int newCols)
   {
-    if (cols < 0)
+    if (newCols < 0)
       throw new IllegalArgumentException ("number of columns cannot be negative");
     if (newCols == 0 && rows == 0)
       throw new IllegalArgumentException ("number of rows is already 0");
@@ -271,7 +271,7 @@ public class GridLayout implements LayoutManager, Serializable
    */
   public void setRows (int newRows)
   {
-    if (rows < 0)
+    if (newRows < 0)
       throw new IllegalArgumentException ("number of rows cannot be negative");
     if (newRows == 0 && cols == 0)
       throw new IllegalArgumentException ("number of columns is already 0");