1
我有一个JComboBox组件:java jcombobox没有滚动条?
ho2Combo = new JComboBox();
ho2Combo.setLocation(x, y);
ho2Combo.setSize(w, h);
ho2Combo.setFont(comboFont);
ho2Combo.setModel(new DefaultComboBoxModel(Format.model(0))); //this fills up the combobox
ho2Combo.setSelectedIndex(0);
ho2Combo.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent evt) {
ho2ComboItemStateChanged(evt);
}
});
add(ho2Combo);
我很想有此组合框没有滚动条!我怎么能达到这个?请帮忙!谢谢!