I am writing an
applet where I want to tab to the next textfield when the user finishes entering text and hits the enter key. I am implementing FocusListener and KeyListener to do this, but I am confused about how exactly to determine whether the user has hit the "enter" key on the keyboard. Do I write code like if (source == enter), or is there some particular code for the enter key on the keyboard?