Try chooser.setPreferredSize(new Dimension(300, 200))
chooser.setPreferredSize(new Dimension(300, 200))