diff options
Diffstat (limited to 'libjava/java/awt/CardLayout.java')
-rw-r--r-- | libjava/java/awt/CardLayout.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libjava/java/awt/CardLayout.java b/libjava/java/awt/CardLayout.java index 05e4a44..9445bf7 100644 --- a/libjava/java/awt/CardLayout.java +++ b/libjava/java/awt/CardLayout.java @@ -1,6 +1,6 @@ // CardLayout.java - Card-based layout engine -/* Copyright (C) 2000 Free Software Foundation +/* Copyright (C) 2000, 2002 Free Software Foundation This file is part of libgcj. @@ -137,14 +137,9 @@ public class CardLayout implements LayoutManager2, Serializable for (int i = 0; i < num; ++i) { - if (comps[i].isVisible ()) - { - // Only resize the one we care about. - comps[i].setBounds (hgap + ins.left, vgap + ins.top, - width - 2 * hgap - ins.left - ins.right, - height - 2 * vgap - ins.top - ins.bottom); - break; - } + comps[i].setBounds (hgap + ins.left, vgap + ins.top, + width - 2 * hgap - ins.left - ins.right, + height - 2 * vgap - ins.top - ins.bottom); } } @@ -272,13 +267,13 @@ public class CardLayout implements LayoutManager2, Serializable { choice = i + 1; if (choice == num) - choice = num - 1; + choice = 0; } else if (what == PREV) { choice = i - 1; if (choice < 0) - choice = 0; + choice = num - 1; } else { |