From 443e99450b172c06438ceb452e9b0dc3c715f914 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Wed, 22 Jun 2011 06:14:41 +0200 Subject: Fixed load warnings panels and everything git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@579 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/LoginPanel.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/jrummikub/view/impl') diff --git a/src/jrummikub/view/impl/LoginPanel.java b/src/jrummikub/view/impl/LoginPanel.java index 9fef581..0cca29d 100644 --- a/src/jrummikub/view/impl/LoginPanel.java +++ b/src/jrummikub/view/impl/LoginPanel.java @@ -34,7 +34,8 @@ class LoginPanel extends JPanel implements ILoginPanel { private JTextField passwordField; private JTextField channelNameField; private JButton startDedicatedServerButton; - + private static final String DEFAULT_PASSWORD = "jrummikub"; + LoginPanel() { setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); @@ -50,7 +51,8 @@ class LoginPanel extends JPanel implements ILoginPanel { startDedicatedServerButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { - useDedicatedServer.emit(passwordField.getText()); + useDedicatedServer.emit(passwordField.getText().isEmpty() ? DEFAULT_PASSWORD + : passwordField.getText()); } }); @@ -144,7 +146,7 @@ class LoginPanel extends JPanel implements ILoginPanel { private void login() { loginEvent.emit(new LoginData(userNameField.getText(), serverNameField - .getText(), passwordField.getText().isEmpty() ? "jrummikub" + .getText(), passwordField.getText().isEmpty() ? DEFAULT_PASSWORD : passwordField.getText(), channelNameField.getText())); } -- cgit v1.2.3