Commit 44e8d1f0 by Tom Tromey Committed by Tom Tromey

GridLayout.java (setColumns): Check newCols, not cols.

	* java/awt/GridLayout.java (setColumns): Check newCols, not cols.
	(setRows): Check newRows, not rows.

From-SVN: r58984
parent 04e6db94
2002-11-10 Tom Tromey <tromey@redhat.com> 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. * jni.cc (_Jv_GetJNIEnvNewFrame): Set env->ex in all cases.
2002-11-09 Tom Tromey <tromey@redhat.com> 2002-11-09 Tom Tromey <tromey@redhat.com>
......
...@@ -245,7 +245,7 @@ public class GridLayout implements LayoutManager, Serializable ...@@ -245,7 +245,7 @@ public class GridLayout implements LayoutManager, Serializable
*/ */
public void setColumns (int newCols) public void setColumns (int newCols)
{ {
if (cols < 0) if (newCols < 0)
throw new IllegalArgumentException ("number of columns cannot be negative"); throw new IllegalArgumentException ("number of columns cannot be negative");
if (newCols == 0 && rows == 0) if (newCols == 0 && rows == 0)
throw new IllegalArgumentException ("number of rows is already 0"); throw new IllegalArgumentException ("number of rows is already 0");
...@@ -271,7 +271,7 @@ public class GridLayout implements LayoutManager, Serializable ...@@ -271,7 +271,7 @@ public class GridLayout implements LayoutManager, Serializable
*/ */
public void setRows (int newRows) public void setRows (int newRows)
{ {
if (rows < 0) if (newRows < 0)
throw new IllegalArgumentException ("number of rows cannot be negative"); throw new IllegalArgumentException ("number of rows cannot be negative");
if (newRows == 0 && cols == 0) if (newRows == 0 && cols == 0)
throw new IllegalArgumentException ("number of columns is already 0"); throw new IllegalArgumentException ("number of columns is already 0");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment