BufferedImage () { int size = 16; BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); Graphics ig = image.getGraphics(); ig.setColor(new Color(0, true)); ig.fillRect(0, 0, size, size); Color imageColor = UIUtil.getLabelForeground(); ig.setColor(imageColor); ig.drawRect(size / 4, size / 4, size / 2 - 1, size / 2 - 1); ig.drawRect(1, 1, size - 3, size - 3); ig.dispose(); return image; }