--- 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");
}