Set own file-icons for selected files on JFileChooser

1k Views Asked by At

I have the following problem. I have a selected filelist and i add the files with help of the JFileChooser. Now i want to remove this filelist and would like to show a green tick on the selected files in JFileChooser instead.

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

1

There are 1 best solutions below

0
On

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