mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 00:38:16 +00:00
'Enter' now makes a user login
This commit is contained in:
@@ -94,17 +94,27 @@ public class VerboseLoader extends JPanel implements ProgressListener {
|
|||||||
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 JTextField passInput = new JPasswordField(25);
|
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));
|
||||||
|
passInput.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
login.doClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
JLabel passwordLabel = new JLabel("Password");
|
JLabel passwordLabel = new JLabel("Password");
|
||||||
passwordLabel.setFont(labelFont);
|
passwordLabel.setFont(labelFont);
|
||||||
passwordLabel.setAlignmentX(Box.CENTER_ALIGNMENT);
|
passwordLabel.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||||
passwordLabel.setForeground(Color.white);
|
passwordLabel.setForeground(Color.white);
|
||||||
|
|
||||||
JButton login = new JButton("Login");
|
|
||||||
login.setAlignmentX(Box.CENTER_ALIGNMENT);
|
login.setAlignmentX(Box.CENTER_ALIGNMENT);
|
||||||
login.setOpaque(false);
|
login.setOpaque(false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user