Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a file's icon in Java?

I'm making a basic file browser and wish to display the icon of each file. Is there any way to get this?

like image 204
Ky. Avatar asked Dec 06 '10 04:12

Ky.


People also ask

How do I get the Java icon?

Click on the Start button and then click on the Control Panel option. In the Control Panel Search enter Java Control Panel. Click on the Java icon to open the Java Control Panel.

What is an icon in Java?

A small fixed size picture, typically used to decorate components.

What is the icon of file?

An ICON file contains image data for a computer icon used to represent files, folders, applications, and so on. ICON files are typically saved as small, square bitmap images, ranging from 16 x 16 to 256 x 256 pixels in size. Most Windows Icon files use the . ICO extension.


1 Answers

Icon icon = FileSystemView.getFileSystemView().getSystemIcon( File );
like image 118
camickr Avatar answered Sep 29 '22 10:09

camickr