Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"Details View" in JFileChooser  RSS feed

 
Prashant Sehgal
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: ??
 
Nathan Pruett
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!