chooser = new JFileChooser();
chooser.setSize(300, 200);
if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
.......
}
This doesn't work. Always opens in default size.
By default, a user can choose only one file.
The object of JFileChooser class represents a dialog window from which the user can select file.
Try chooser.setPreferredSize(new Dimension(300, 200))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With