diff options
author | Tania Bento <tbento@redhat.com> | 2006-10-18 21:51:04 +0000 |
---|---|---|
committer | Tania Bento <tbento@redhat.com> | 2006-10-18 21:51:04 +0000 |
commit | ed77968e223e822b5375f3e866abf2b998149faa (patch) | |
tree | 71759d0faeb7e3e4ca83909d5222e988287de527 | |
parent | ab0e421d1e68b70498446e8de992e2f0ea39ae92 (diff) | |
download | classpath-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-- | ChangeLog | 7 | ||||
-rw-r--r-- | java/awt/CardLayout.java | 7 |
2 files changed, 13 insertions, 1 deletions
@@ -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) |