From eb55ea3848fd054360fef5ecfead30f35c606327 Mon Sep 17 00:00:00 2001 From: Clisprail Date: Wed, 27 Aug 2014 13:12:23 +0200 Subject: [PATCH] 'Enter' on user field now goes to next field --- .../org/parabot/core/ui/components/VerboseLoader.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parabotv2/src/org/parabot/core/ui/components/VerboseLoader.java b/parabotv2/src/org/parabot/core/ui/components/VerboseLoader.java index 5f3a899..ac65482 100644 --- a/parabotv2/src/org/parabot/core/ui/components/VerboseLoader.java +++ b/parabotv2/src/org/parabot/core/ui/components/VerboseLoader.java @@ -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));