@Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g.create(); g2.setColor(Color.WHITE); int width = getIconWidth(); int height = getIconHeight(); g2.drawRect(1, 1, width - 2, height - 2); g2.drawLine(width / 2 - 1, 1, width / 2 - 1, height - 1); g2.drawLine(width / 2, 1, width / 2, height - 1); g2.drawLine(width / 2 + 1, 1, width / 2 + 1, height - 1); }