javaswingicons

Default action button icons in Java


Is there a set of default action icons available in the Swing application framework?

For instance, instead of making a button that says "Save," I'd like the standard picture of a floppy disk without having to specify an image myself. For "Open", I'd like the standard picture of a file folder. It would be great if these adapted to the look and feel, but I'd take Swing defaults.

I'm thinking of something like:

new JButton(new ImageIcon(DEFAULT_OPEN_ICON));

I have found lots of resources about changing the look and feel, but nothing about icons either built into Java or dug out of the native system.


Solution

  • Java Look and Feel Graphics Repository has a few icons you might be able to use.