// Image used as the template for the icons
final GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
BufferedImage image = gc.createCompatibleImage(ICON_WIDTH, ICON_WIDTH, Transparency.OPAQUE);
// Active, not selected
Graphics2D g = image.createGraphics();
g.setColor(style.getForeground());
g.fillRect(0, 0, ICON_WIDTH, ICON_WIDTH);
g.setClip(0, 0, ICON_WIDTH, ICON_WIDTH);
border.paintBorder(null, g, 0, 0, ICON_WIDTH, ICON_WIDTH);
g.dispose();