I'm doing a piece of code in java and I need to get different sizes of system icons of files. I know that for getting file system icons, i should use this:
File file = new File("Whatever.txt");
FileSystemView view = FileSystemView.getFileSystemView();
Icon icon = view.getSystemIcon(file);
but this code returns the smallest size of icon. What sholud I do for getting other sizes?
For 32x32 Icon you can use ShellFolder.
sun.awt.shell.ShellFolder.getShellFolder( file ).getIcon( true )
Or use a JNI Api . Both "solutions" already discuted here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With