jdk/src/share/classes/javax/swing/LookAndFeel.java
changeset 3084 67ca55732362
parent 2 90ce3da70b43
child 5506 202f599c92aa
--- a/jdk/src/share/classes/javax/swing/LookAndFeel.java	Fri Jun 19 16:49:50 2009 -0400
+++ b/jdk/src/share/classes/javax/swing/LookAndFeel.java	Tue Jun 23 13:35:58 2009 +0400
@@ -32,6 +32,7 @@
 import java.awt.Component;
 import java.awt.SystemColor;
 import java.awt.Toolkit;
+import sun.awt.SunToolkit;
 
 import javax.swing.text.*;
 import javax.swing.border.*;
@@ -271,7 +272,7 @@
         // this is a special case because the JPasswordField's ancestor heirarchy
         // includes a class outside of javax.swing, thus we cannot call setUIProperty
         // directly.
-        if (c instanceof JPasswordField) {
+        if (SunToolkit.isInstanceOf(c, "javax.swing.JPasswordField")) {
             if (!((JPasswordField)c).customSetUIProperty(propertyName, propertyValue)) {
                 c.setUIProperty(propertyName, propertyValue);
             }