From 182d3b499b306f660d3bf69ddd83d60f47b9e223 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 10 Jun 2011 19:06:52 +0200 Subject: Make XMPP login work git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@404 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/LoginPanel.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/jrummikub/view/impl') 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; -- cgit v1.2.3