• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

"Details View" in JFileChooser  RSS feed

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Anyone :roll: ??
 
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!