Hi Watts,
You can also set keycodes directly:
Panel p = new Panel(new GridLayout(1,2));
TextField tf = new TextField();
p.add(tf);
tf.addKeyListener(new KeyListener()
{
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == KeyEvent.VK_ENTER)
{
e.setKeyCode(KeyEvent.VK_TAB);
}
}
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e){}
});
Now when you press Enter at TextField it's mapped to TAB.
I hope that helped you.
-Vepo