summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-06-22 06:14:41 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-06-22 06:14:41 +0200
commit443e99450b172c06438ceb452e9b0dc3c715f914 (patch)
tree091dfe7f406f94087a980251ac439478c5b403d7 /src/jrummikub/view/impl
parent86eeace6738c4715857df6730dff41e788918b43 (diff)
downloadJRummikub-443e99450b172c06438ceb452e9b0dc3c715f914.tar
JRummikub-443e99450b172c06438ceb452e9b0dc3c715f914.zip
Fixed load warnings panels and everything
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@579 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/LoginPanel.java8
1 files changed, 5 insertions, 3 deletions
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()));
}