private void addEnterListenerToUsernameField(Action action) { usernameField.getInputMap().put(ClientUI.ENTER, "login"); usernameField.getActionMap().put("login", action); }
private void addUsernameField() { usernameField = new UsernameField(); usernameField.setBounds(BOUNDS_USERNAME_FIELD); usernameField.setFont(ClientUI.FONT_NORMAL); contentPanel.add(usernameField); }