the keyadapter is of course added to the textfields, not the jframe
----old question----------
we are in the finishing stages and are cleaning up small issues of the
aplication.
next on our list is how to set ENTER perform the okbutton method of a
jframe
we are using jdk1.1.8 and swing 1.1.1
we have added this to the jframe, and it works inside Visual Age, but not
outside, ideas ?
KeyListener kl = new KeyAdapter()
{
public void keyTyped(java.awt.event.KeyEvent e)
{
if ( ((byte)e.getKeyChar()) == e.VK_ENTER )
actionPerformed(new ActionEvent( btnOk,
0, "Ok"));
}
};
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing