summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTania Bento <tbento@redhat.com>2006-10-18 21:51:04 +0000
committerTania Bento <tbento@redhat.com>2006-10-18 21:51:04 +0000
commited77968e223e822b5375f3e866abf2b998149faa (patch)
tree71759d0faeb7e3e4ca83909d5222e988287de527
parentab0e421d1e68b70498446e8de992e2f0ea39ae92 (diff)
downloadclasspath-ed77968e223e822b5375f3e866abf2b998149faa.tar.gz
2006-10-18 Tania Bento <tbento@redhat.com>
* java/awt/CardLayout.java: (maximumLayoutSize): Return a new Dimension with Integer.MAX_VALUE as its height and width if Container passed as argument is null. (gotoComponent): Consider the case where the component is not visible.
-rw-r--r--ChangeLog7
-rw-r--r--java/awt/CardLayout.java7
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 690f5b6a6..fb8886dc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-18 Tania Bento <tbento@redhat.com>
+
+ * java/awt/CardLayout.java:
+ (maximumLayoutSize): Return a new Dimension with Integer.MAX_VALUE as
+ its height and width if Container passed as argument is null.
+ (gotoComponent): Consider the case where the component is not visible.
+
2006-10-18 Thomas Fitzsimmons <fitzsim@redhat.com>
* resource/gnu/classpath/tools/appletviewer/MessagesBundle.properties:
diff --git a/java/awt/CardLayout.java b/java/awt/CardLayout.java
index 7b733c821..2e3feece8 100644
--- a/java/awt/CardLayout.java
+++ b/java/awt/CardLayout.java
@@ -225,6 +225,8 @@ public class CardLayout implements LayoutManager2, Serializable
*/
public Dimension maximumLayoutSize (Container target)
{
+ if (target == null)
+ return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
// The JCL says that this returns Integer.MAX_VALUE for both
// dimensions. But that just seems wrong to me.
return getSize (target, MAX);
@@ -423,7 +425,10 @@ public class CardLayout implements LayoutManager2, Serializable
if (choice >= 0)
break;
- }
+ } else
+ {
+ comps[i].setVisible(true);
+ }
}
if (choice >= 0 && choice < num)