< prev index next >

src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java

Print this page

        

*** 258,268 **** public Dimension getPreferredSize() { String title = frame.getTitle(); FontMetrics fm = frame.getFontMetrics(defaultTitleFont); int w = 4; if (title != null) { ! w += SwingUtilities2.stringWidth(frame, fm, title); } return new Dimension(w, LABEL_HEIGHT + LABEL_DIVIDER); } public void paint(Graphics g) { --- 258,268 ---- public Dimension getPreferredSize() { String title = frame.getTitle(); FontMetrics fm = frame.getFontMetrics(defaultTitleFont); int w = 4; if (title != null) { ! w += getTextUIDrawing().getStringWidth(frame, fm, title); } return new Dimension(w, LABEL_HEIGHT + LABEL_DIVIDER); } public void paint(Graphics g) {
*** 286,296 **** 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); } } } @SuppressWarnings("serial") // Superclass is not serializable across versions --- 286,296 ---- int y = LABEL_HEIGHT - SwingUtilities2.getFontMetrics(frame, g). getDescent(); g.setColor(UIManager.getColor("inactiveCaptionText")); String title = frame.getTitle(); if (title != null) { ! getTextUIDrawing().drawString(frame, g, title, 4, y); } } } @SuppressWarnings("serial") // Superclass is not serializable across versions
< prev index next >