aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JFileChooser's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFileChooser Watch "JFileChooser New topic
Author

JFileChooser's "Detail View" JTable

Shepard Plowden
Greenhorn

Joined: Nov 19, 2012
Posts: 1
Does anyone have code or can point me to: how to set JFileChooser's "Detail View" JTable to AUTO_RESIZE_ALL_COLUMNS ?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

You can drill down to the JList that represents the list view, get a reference to its ancestor of class sun.swing.FilePane, then add a ContainerListener to the FilePane that listens for a componentAdded(...) and drills down to determine whether there is a JTable in its hierarchy. Then set the autoResizeMode of that JTable.

I'm curious: why is this behavior important (or even desirable)?

edit: Note that this is totally implementation dependent and may break in a future release of Swing (if there ever is one).


luck, db
There are no new questions, but there may be new answers.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Can't it already break if you switch UI?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

Probably can. I mostly limit my research to the default Metal LaF.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JFileChooser's "Detail View" JTable
 
Similar Threads
About JTable
JTable
jtable
JTable
Jtable