Set custom icon files for selected files on JFileChooser

I have the following problem. I have a selected list of files and I am adding files using JFileChooser. Now I want to delete this list of files and instead I want to show a green checkmark on the selected files in JFileChooser.

Is it possible to change the icons of some specific files in JFileChooser(in this case, for selected files)?

+3
source share
1 answer

Yes, you can do this by passing a custom FileView to the setFileView () method . There is even an example of this in the JFileChooser tutorial .

+4
source

All Articles