final UILabel lName = new UILabel("Name");
final UITextField tfName = new UITextField();
tfName.setText("player1");
tfName.setLayoutData(GridLayoutData.WrapAndGrow);
final UILabel lPassword = new UILabel("Password");
final UIPasswordField tfPassword = new UIPasswordField();
tfPassword.setLayoutData(GridLayoutData.WrapAndGrow);
final UIButton btLogin = new UIButton("login");
btLogin.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent event) {
System.out.println("login as user: " + tfName.getText() + " password: " + tfPassword.getText());
}
});
pLogin.add(lHeader);
pLogin.add(lName);
pLogin.add(tfName);