diff options
Diffstat (limited to 'src/jrummikub/view')
-rw-r--r-- | src/jrummikub/view/impl/LoginPanel.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/jrummikub/view/impl/LoginPanel.java b/src/jrummikub/view/impl/LoginPanel.java index 450c392..842bf74 100644 --- a/src/jrummikub/view/impl/LoginPanel.java +++ b/src/jrummikub/view/impl/LoginPanel.java @@ -10,6 +10,7 @@ import javax.swing.Box; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; +import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; @@ -39,10 +40,10 @@ class LoginPanel extends JPanel implements ILoginPanel { c.weightx = 1; c.weighty = 1; - userNameField = addInputRow("Benutzername:"); - serverNameField = addInputRow("Server:"); - passwordField = addInputRow("Passwort:"); - channelNameField = addInputRow("Channel:"); + userNameField = addInputRow("Benutzername:", new JTextField()); + serverNameField = addInputRow("Server:", new JTextField()); + passwordField = addInputRow("Passwort:", new JPasswordField()); + channelNameField = addInputRow("Channel:", new JTextField()); add(Box.createVerticalGlue(), c); c.gridwidth = 1; @@ -85,7 +86,7 @@ class LoginPanel extends JPanel implements ILoginPanel { return cancelEvent; } - private JTextField addInputRow(String label) { + private JTextField addInputRow(String label, JTextField textField) { GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.gridwidth = 1; @@ -94,8 +95,6 @@ class LoginPanel extends JPanel implements ILoginPanel { add(new JLabel(label), c); - JTextField textField = new JTextField(); - c.gridwidth = GridBagConstraints.REMAINDER; add(textField, c); return textField; |