|
-
May 26th, 2010, 08:15 AM
#1
JFileChooser
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.
-= the best is yet to come =-
-
May 26th, 2010, 08:28 AM
#2
Re: JFileChooser
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:
Code:
protected JDialog createDialog(Component parent) {
JDialog dlg = super.createDialog(parent);
dlg.setSize(new Dimension (WIDTH, HEIGHT));
return dlg;
}
It is better to have an approximate answer to the right question than an exact answer to the wrong one...
J. Tukey
Last edited by dlorde; May 26th, 2010 at 08:34 AM.
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|