Java JComboBox选择索引

时间:2015-10-29 23:22:06

标签: java swing jcombobox

我有这部分代码:

String[] emailList = { "Choose an email type", "yahoo.com", "gmail.com", "mail.com", "OTHER"};
JComboBox emailComboBox = new JComboBox (emailList);
registerPanel.add(emailComboBox);
emailComboBox.setBounds(350, 286, 173, 20);

当用户选择索引0或4(选择..和其他)来执行某些操作时,该怎么办。

0 个答案:

没有答案