{
passwordTextBox.focus();
}
}
});
form.add(usernameTextBox, new FormData("-20"));
passwordTextBox = new TextField<String>();
passwordTextBox.setFieldLabel(textMessages.password());
passwordTextBox.setPassword(true);
passwordTextBox.addKeyListener(new KeyListener()
{
@Override
public void componentKeyPress(ComponentEvent event)
{
if (event.getKeyCode() == KeyCodes.KEY_ENTER)
{
doSubmit();
}
}
});
form.add(passwordTextBox, new FormData("-20"));
enterButton = new Button(textMessages.submit(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
doSubmit();