How to get all different file system icon size

I am making a piece of code in java and I need to get different sizes of system file icons. I know that to get file system icons I have to use this:

File file = new File("Whatever.txt"); FileSystemView view = FileSystemView.getFileSystemView(); Icon icon = view.getSystemIcon(file); 

but this code returns the smallest icon size. What am I doing to get other sizes?

+7
source share
1 answer

For the 32x32 icon, you can use ShellFolder.

 sun.awt.shell.ShellFolder.getShellFolder( file ).getIcon( true ) 

Or use JNI Api. Both "solutions" have already been discussed here.

0
source

All Articles