Netbeans JComboBox KeyEvent
Hi;
The KeyTyped, or KeyPressed events are not working with the comboboxs.
Let us have a JTextFiels aa and a JComboBox cc
then using Netbeans you may define the follwoing routines;
private void aaKeyTyped(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
if (evt.getKeyChar()=='\n')
{ System.out.println("Enter keytyped");}
} // this is working fine
private void ccKeyTyped(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
System.out.println("enter this routine");
// it seems not entering the routine at all why?
// It entered the ccItemStateChanged routine only, while
// I need to build some code according to entering the Enter Key
if (evt.getKeyChar()=='\n')
{ System.out.println("Enter keytyped");}
} // this is not working at all
I am using Netbeans 5.0 & JDK1.5.06
Is this a Netbeans bug?
Any help;
Thanks;

