mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 08:39:33 +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);
|
usernameLabel.setForeground(Color.white);
|
||||||
|
|
||||||
final JTextField userInput = new JTextField(25);
|
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.setFont(labelFont);
|
||||||
userInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
userInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||||
userInput.setMaximumSize(userInput.getPreferredSize());
|
userInput.setMaximumSize(userInput.getPreferredSize());
|
||||||
|
|
||||||
final JButton login = new JButton("Login");
|
final JButton login = new JButton("Login");
|
||||||
|
|
||||||
final JTextField passInput = new JPasswordField(25);
|
|
||||||
passInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
passInput.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||||
passInput.setMaximumSize(userInput.getPreferredSize());
|
passInput.setMaximumSize(userInput.getPreferredSize());
|
||||||
passInput.setPreferredSize(new Dimension(userInput.getWidth(), 20));
|
passInput.setPreferredSize(new Dimension(userInput.getWidth(), 20));
|
||||||
|
|||||||
Reference in New Issue
Block a user