如何在按键事件中获取可编辑组合框的类型值?请帮帮我。请找到我的代码:
comboInstrument.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
public void keyReleased(KeyEvent e) {
System.out.println(comboInstrument.getSelectedItem().toString());
}
public void keyTyped(KeyEvent e) {
// TODO Auto-generated method stub
}
public void keyPressed(KeyEvent e) {
// TODO Auto-generated method stub
}
});