【发布时间】:2012-07-15 15:08:07
【问题描述】:
我有一个 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);
我希望这个组合框没有滚动条!我怎么能做到这一点?请帮忙!谢谢!
【问题讨论】:
标签: java swing jcombobox jlist jscrollbar