- 论坛徽章:
- 0
|
get a different model of serial number for comboBox.
private DefaultComboBoxModel getComboBoxModel(int start, int finish, int step, int adjust) {
String combo[] = new String[(finish-start+1)/step];
for(int i = start ; i
combo[(i-start)/step] = java.lang.String.valueOf(i + adjust);
}
DefaultComboBoxModel comboModel = new DefaultComboBoxModel(combo);
return comboModel;
}
get a different model of serial number for comboBox.
private DefaultComboBoxModel getComboBoxModel(int start, int finish, int step, int adjust) {
String combo[] = new String[(finish-start+1)/step];
for(int i = start ; i
combo[(i-start)/step] = java.lang.String.valueOf(i + adjust);
}
DefaultComboBoxModel comboModel = new DefaultComboBoxModel(combo);
return comboModel;
}
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/2871/showart_27944.html |
|