mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
'Enter' on user field now goes to next field
This commit is contained in:
@@ -90,13 +90,21 @@ public class VerboseLoader extends JPanel implements ProgressListener {
|
||||
usernameLabel.setForeground(Color.white);
|
||||
|
||||
final JTextField userInput = new JTextField(25);
|
||||
final JTextField passInput = new JPasswordField(25);
|
||||
userInput.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
passInput.requestFocus();
|
||||
}
|
||||
|
||||
});
|
||||
userInput.setFont(labelFont);
|
||||
userInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||
userInput.setMaximumSize(userInput.getPreferredSize());
|
||||
|
||||
final JButton login = new JButton("Login");
|
||||
|
||||
final JTextField passInput = new JPasswordField(25);
|
||||
passInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||
passInput.setMaximumSize(userInput.getPreferredSize());
|
||||
passInput.setPreferredSize(new Dimension(userInput.getWidth(), 20));
|
||||
|
||||
Reference in New Issue
Block a user