Here you can find the source of createTransparentIcon()
private static Icon createTransparentIcon()
//package com.java2s; //License from project: LGPL import javax.swing.*; import java.awt.image.BufferedImage; public class Main { private static final int SMALL_ICON_WIDTH = 16; private static Icon createTransparentIcon() { BufferedImage emptyImage = new BufferedImage(SMALL_ICON_WIDTH, SMALL_ICON_WIDTH, BufferedImage.TYPE_INT_ARGB); return new ImageIcon(emptyImage); }/*w w w . j a v a 2 s.c o m*/ }