| 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: 4165
|
|
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: 19216
|
|
|
Can't it already break if you switch UI?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4165
|
|
|
Probably can. I mostly limit my research to the default Metal LaF.
|
 |
 |
|
|
subject: JFileChooser's "Detail View" JTable
|
|
|