< prev index next >
src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java
Print this page
@@ -258,11 +258,11 @@
public Dimension getPreferredSize() {
String title = frame.getTitle();
FontMetrics fm = frame.getFontMetrics(defaultTitleFont);
int w = 4;
if (title != null) {
- w += SwingUtilities2.stringWidth(frame, fm, title);
+ w += getTextUIDrawing().getStringWidth(frame, fm, title);
}
return new Dimension(w, LABEL_HEIGHT + LABEL_DIVIDER);
}
public void paint(Graphics g) {
@@ -286,11 +286,11 @@
int y = LABEL_HEIGHT - SwingUtilities2.getFontMetrics(frame, g).
getDescent();
g.setColor(UIManager.getColor("inactiveCaptionText"));
String title = frame.getTitle();
if (title != null) {
- SwingUtilities2.drawString(frame, g, title, 4, y);
+ getTextUIDrawing().drawString(frame, g, title, 4, y);
}
}
}
@SuppressWarnings("serial") // Superclass is not serializable across versions
< prev index next >