jdk/src/share/classes/javax/swing/border/TitledBorder.java
changeset 463 435cd1cc42b6
parent 2 90ce3da70b43
child 2658 43e06bc950ec
--- a/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Thu May 01 14:47:50 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/border/TitledBorder.java	Wed May 07 16:08:31 2008 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -642,6 +642,9 @@
         if (c == null) {
             throw new NullPointerException("Must supply non-null component");
         }
+        if (width < 0) {
+            throw new IllegalArgumentException("Width must be >= 0");
+        }
         if (height < 0) {
             throw new IllegalArgumentException("Height must be >= 0");
         }