I am trying to populate my JComboBox with numbers 25 to 50 and this is what I've done,
--at the variable declarations--
String[] val = new String[25];
JComboBox box1 = new JComboBox();
--and in the "main"--
for(int i=0; i==val.length; i++){
val[i] = Integer.toString(i+25);
}
box1.setModel(new DefaultComboBoxModel(val));
but in the end, the JComboBox only displays blank 25 spaces but does not display the numbers that should be saved in the string array which is numbers 25 - 50. Please help.