summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gilbert <david.gilbert@object-refinery.com>2006-07-07 14:46:07 +0000
committerDavid Gilbert <david.gilbert@object-refinery.com>2006-07-07 14:46:07 +0000
commitee5ae622d51116fd342f2875d7f561a7cf7b5ea4 (patch)
tree1c486a0a9f58341504d628bc437b84114a21344a
parentc92cc596cb727773834f1350f03c932910e7f10a (diff)
downloadclasspath-ee5ae622d51116fd342f2875d7f561a7cf7b5ea4.tar.gz
2006-07-07 David Gilbert <david.gilbert@object-refinery.com>
* javax/swing/border/TitledBorder.java (setTitlePosition): Added message to exception, (setTitleJustification): Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--javax/swing/border/TitledBorder.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c9cfa0417..f4454860b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-07-07 David Gilbert <david.gilbert@object-refinery.com>
+ * javax/swing/border/TitledBorder.java
+ (setTitlePosition): Added message to exception,
+ (setTitleJustification): Likewise.
+
+2006-07-07 David Gilbert <david.gilbert@object-refinery.com>
+
* javax/swing/plaf/metal/MetalLookAndFeel.java
(createDefaultTheme): Corrected API docs,
(initComponentDefaults): Added entry for 'TitledBorder.border',
diff --git a/javax/swing/border/TitledBorder.java b/javax/swing/border/TitledBorder.java
index 56146e01d..38ccd720f 100644
--- a/javax/swing/border/TitledBorder.java
+++ b/javax/swing/border/TitledBorder.java
@@ -1,5 +1,5 @@
/* TitledBorder.java --
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -961,7 +961,8 @@ public class TitledBorder extends AbstractBorder
public void setTitlePosition(int titlePosition)
{
if ((titlePosition < DEFAULT_POSITION) || (titlePosition > BELOW_BOTTOM))
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException(titlePosition
+ + " is not a valid title position.");
// Swing borders are not JavaBeans, thus no need to fire an event.
this.titlePosition = titlePosition;
@@ -982,7 +983,8 @@ public class TitledBorder extends AbstractBorder
{
if ((titleJustification < DEFAULT_JUSTIFICATION)
|| (titleJustification > TRAILING))
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException(titleJustification
+ + " is not a valid title justification.");
// Swing borders are not JavaBeans, thus no need to fire an event.
this.titleJustification = titleJustification;