Skip to content

Instantly share code, notes, and snippets.

@mudgen
Created November 13, 2012 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mudgen/b5a54b7ea9e14edba5fa to your computer and use it in GitHub Desktop.
Save mudgen/b5a54b7ea9e14edba5fa to your computer and use it in GitHub Desktop.
public Image getIcon(int kind) {
switch (kind) {
case BeanInfo.ICON_COLOR_16x16:
case BeanInfo.ICON_MONO_16x16:
return new ImageIcon(getClass().getResource("/images/hello_world_16.png")).getImage();
case SimpleBeanInfo.ICON_COLOR_32x32:
case SimpleBeanInfo.ICON_MONO_32x32:
return new ImageIcon(getClass().getResource("/images/hello_world_32.png")).getImage();
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment