Source Code : Creates a transparent icon.
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Creates a transparent icon.
import java.awt.image.BufferedImage;
import java.util.Arrays;
import javax.swing.Icon;
import javax.swing.ImageIcon;
public final class ImageUtils
{
/**
* Creates a transparent image. These can be used for aligning menu items.
*
* @param width the width.
* @param height the height.
* @return the created transparent image.
*/
public static BufferedImage createTransparentImage (final int width, final int height)
{
return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
}
/**
* Creates a transparent icon. The Icon can be used for aligning menu items.
*
* @param width the width of the new icon
* @param height the height of the new icon
* @return the created transparent icon.
*/
public static Icon createTransparentIcon (final int width, final int height)
{
return new ImageIcon(createTransparentImage(width, height));
}
}
Thank with us