Here you can find the source of emptyIcon(final int width, final int height)
Parameter | Description |
---|---|
width | icon width |
height | icon height |
public static Icon emptyIcon(final int width, final int height)
//package com.java2s; //License from project: LGPL import java.awt.Component; import java.awt.Graphics; import javax.swing.Icon; public class Main { /**/* w w w. ja v a 2 s .co m*/ * Returns an icon with a given size and no content. * * @param width icon width * @param height icon height */ public static Icon emptyIcon(final int width, final int height) { return new Icon() { public int getIconWidth() { return width; } public int getIconHeight() { return height; } public void paintIcon(Component c, Graphics g, int x, int y) { } }; } }