summaryrefslogtreecommitdiff
path: root/java/awt/GridLayout.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-11-10 17:35:58 +0000
committerTom Tromey <tromey@redhat.com>2002-11-10 17:35:58 +0000
commit0bdbe91a4cbb837d5d3b943353f20a6a6c402b66 (patch)
treefb14b199ae1557ef43bd07835b892b17af8d7c55 /java/awt/GridLayout.java
parent0e344c8f433ccbc36d373c95442d3f9e1dd0f32e (diff)
downloadclasspath-0bdbe91a4cbb837d5d3b943353f20a6a6c402b66.tar.gz
* java/awt/GridLayout.java (setColumns): Check newCols, not cols.
(setRows): Check newRows, not rows.
Diffstat (limited to 'java/awt/GridLayout.java')
-rw-r--r--java/awt/GridLayout.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/awt/GridLayout.java b/java/awt/GridLayout.java
index 58145f8cb..51e012a4c 100644
--- a/java/awt/GridLayout.java
+++ b/java/awt/GridLayout.java
@@ -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");