Changing size of JOptionPane.showInputMessage

5

I tried several methods like setPrefferedSize, setSize with / without pack () but nothing seems to affect JoptionPane

code:

        selectProcess = new JOptionPane();
    selectProcess.showInputDialog(null,"Please select game process","Select" , JOptionPane.QUESTION_MESSAGE, null ,processes.toArray(),null);

Would you like to make it bigger for the list to show more than one at a time?

    
asked by anonymous 30.08.2014 / 16:34

1 answer

1

I checked the google and found this solution. See if you can help.

JOptionPane pane = new JOptionPane(args);
JDialog dialog = pane.createDialog(parent, title);
dialog.setSize(size);
dialog.show();
  

link

    
02.09.2014 / 13:19