Java Swing Icon createTransparentIcon()

Here you can find the source of createTransparentIcon()

Description

create Transparent Icon

License

LGPL

Declaration

private static Icon createTransparentIcon() 

Method Source Code


//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*/
}

Related

  1. createIcon(java.awt.Component component)
  2. createIcon(String resource)
  3. createIcon(URL resource)
  4. createIconFromResource(ClassLoader loader, String resourceName)
  5. createIconFromStream(InputStream input)
  6. createTransparentIcon(final int width, final int height)
  7. createTransparentIcon(int width)
  8. darken(Icon icon)
  9. emptyIcon(final int width, final int height)