jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java
changeset 1290 da8902cd496c
parent 2 90ce3da70b43
child 1639 a97859015238
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Jul 25 14:14:30 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Jul 25 17:50:36 2008 +0400
@@ -266,7 +266,7 @@
             return null;
         }
 
-        Icon icon = (Icon) b.getIcon();
+        Icon icon = b.getIcon();
         String text = b.getText();
 
         Font font = b.getFont();
@@ -277,7 +277,7 @@
         Rectangle viewR = new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);
 
         SwingUtilities.layoutCompoundLabel(
-            (JComponent) b, fm, text, icon,
+            b, fm, text, icon,
             b.getVerticalAlignment(), b.getHorizontalAlignment(),
             b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
             viewR, iconR, textR, (text == null ? 0 : textIconGap)