Pawan Gupta
Pawan Gupta

Reputation: 315

How to create file-chooser

How to create file-chooser that can select multiple derives/folders/files at a time as bellow figure example. I want to use checkbox for selecting items and the drive which are not available at the time of choosing the should be disable like gray mark for H, I, Z derives n fig. enter image description here

Upvotes: 1

Views: 116

Answers (1)

moeTi
moeTi

Reputation: 3904

There is no default component which looks like the one in your screenshot. You would have to build that by yourself.

Have a look at JTrees and use a custom TreeRenderer which uses JCheckboxes to display the nodes. You can then enable/disable specific nodes, and get a list of all selected ones

Upvotes: 1

Related Questions