int (ThumbnailComponent tc, Graphics g) { Font font = getSmallFont().deriveFont(Font.BOLD); FontMetrics fontMetrics = g.getFontMetrics(font); String format = StringUtil.toUpperCase(tc.getFormat()); int stringWidth = fontMetrics.stringWidth(format); int x = ImagesIcons.ThumbnailBlank.getIconWidth() - stringWidth + 2; int y = ImagesIcons.ThumbnailBlank.getIconHeight() - fontMetrics.getHeight() + 4; g.setColor(LINE_COLOR); g.drawLine(x - 3, y - 1, x + stringWidth + 1, y - 1); g.drawLine(x - 4, y, x - 4, y + fontMetrics.getHeight() - 1); g.setColor(getFormatColor(format)); g.setFont(font); g.drawString( format, x, y + fontMetrics.getAscent() ); return fontMetrics.getHeight(); }