From 44e8d1f0064828a9a59df0097b72e7299d5d500b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 10 Nov 2002 17:35:13 +0000 Subject: GridLayout.java (setColumns): Check newCols, not cols. * java/awt/GridLayout.java (setColumns): Check newCols, not cols. (setRows): Check newRows, not rows. From-SVN: r58984 --- libjava/java/awt/GridLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libjava/java/awt/GridLayout.java') diff --git a/libjava/java/awt/GridLayout.java b/libjava/java/awt/GridLayout.java index 58145f8..51e012a 100644 --- a/libjava/java/awt/GridLayout.java +++ b/libjava/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"); -- cgit v1.1