not sure about the content of your JFrame, if you ask about some input from users, you can use JOptionPane, this can also set JFrame as modal
JFrame frame = new JFrame(); String bigList[] = new String[30]; for (int i = 0; i < bigList.length; i++) { bigList[i] = Integer.toString(i); } JOptionPane.showInputDialog( frame, "Select a item", "The List", JOptionPane.PLAIN_MESSAGE, null, bigList, "none"); }
Ryan Oct 23 '12 at 15:08 2012-10-23 15:08
source share