Details
-
Type:
Sub-task
-
Status: Closed
-
Priority:
P3
-
Resolution: Delivered
-
Affects Version/s: 17
-
Fix Version/s: 17
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Verification:Verified
Description
A new method, `javax.swing.filechooser.FileSystemView.getSystemIcon(File, int, int)`, is available in JDK 17 that enables access to higher quality icons when possible. It is fully implemented for the Windows platform; however, results on other platforms might vary and will be enhanced later. For example, by using the following code:
```
FileSystemView fsv = FileSystemView.getFileSystemView();
Icon icon = fsv.getSystemIcon(new File("application.exe"), 64, 64);
JLabel label = new JLabel(icon);
```
The user can obtain a higher quality icon for the "application.exe" file. This icon is suitable for creating a label that can be better scaled in a HighDPI environment.
```
FileSystemView fsv = FileSystemView.getFileSystemView();
Icon icon = fsv.getSystemIcon(new File("application.exe"), 64, 64);
JLabel label = new JLabel(icon);
```
The user can obtain a higher quality icon for the "application.exe" file. This icon is suitable for creating a label that can be better scaled in a HighDPI environment.