How can one adjust and alter the size of the open dialog shown when using the JFIleChooser object?
I tired to put the FileChooser in a seperate panel with a specific size, but that didn't work.
Printable View
How can one adjust and alter the size of the open dialog shown when using the JFIleChooser object?
I tired to put the FileChooser in a seperate panel with a specific size, but that didn't work.
Your best bet is probably to override the JFileChooser.createDialog method, calling the superclass method, then setting the size you want on the dialog it returns:It is better to have an approximate answer to the right question than an exact answer to the wrong one...Code:protected JDialog createDialog(Component parent) {
JDialog dlg = super.createDialog(parent);
dlg.setSize(new Dimension (WIDTH, HEIGHT));
return dlg;
}
J. Tukey