• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Details View" in JFileChooser

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Prashant Sehgal
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone :roll: ??
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Prashant Sehgal
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic