When I load my JFileChooser, I want the file listing inside it to default to the "Details View" rather than the "List View". How do I do that? I know that I have to approach this using the FileChooserUI class...but I couldn't find any methods that let me access the "Details View" and the "List View" buttons. So how do I do it ?
Unfortunately, it is hardcoded into MetalFileChooserUI for the list view panel to be the default, and anything that can affect this is defined as private. There are some comments in the code that say this code is defined as private because it may change soon, so hopefully they will make it more modifiable when they change it. Looks like you are out of luck for now though...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Jun 20, 2003
Arrghh ! I feared that this would be the case. Thanks Nathan for confirming my doubt. While scouring through the API I also ran into the class and was hoping that some implementation of this somewhere would also allow the JFileChooser's view to be set to a JTable instead of a JList...but didn't find anything like that ! Anyway, thanks again.