diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-21 04:52:11 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-21 04:52:11 +0200 |
commit | 67105d228ed4976e73ed62b95db40ad8f485d7b4 (patch) | |
tree | f658c977f09dbd89a309c9ad58b7bb2c3a511ebd | |
parent | d59f0eb27a674e0b6dc821771a40adbd39f4c3e2 (diff) | |
download | JRummikub-67105d228ed4976e73ed62b95db40ad8f485d7b4.tar JRummikub-67105d228ed4976e73ed62b95db40ad8f485d7b4.zip |
Reset login panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@542 72836036-5685-4462-b002-a69064685172
-rw-r--r-- | src/jrummikub/view/impl/LoginPanel.java | 10 | ||||
-rw-r--r-- | src/jrummikub/view/impl/View.java | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/jrummikub/view/impl/LoginPanel.java b/src/jrummikub/view/impl/LoginPanel.java index 4712630..43c7550 100644 --- a/src/jrummikub/view/impl/LoginPanel.java +++ b/src/jrummikub/view/impl/LoginPanel.java @@ -48,15 +48,12 @@ class LoginPanel extends JPanel implements ILoginPanel { }; userNameField = addInputRow("Benutzername:", new JTextField()); - userNameField.setText("test1"); userNameField.addActionListener(loginAction); serverNameField = addInputRow("Server:", new JTextField()); - serverNameField.setText("universe-factory.net"); serverNameField.addActionListener(loginAction); passwordField = addInputRow("Passwort:", new JPasswordField()); passwordField.addActionListener(loginAction); channelNameField = addInputRow("Channel:", new JTextField()); - channelNameField.setText("jrummikub@muc.universe-factory.net"); channelNameField.addActionListener(loginAction); add(Box.createVerticalGlue(), c); @@ -84,6 +81,13 @@ class LoginPanel extends JPanel implements ILoginPanel { 10, 10, 10, 10))); } + void resetLoginPanel() { + userNameField.setText("test1"); + serverNameField.setText("universe-factory.net"); + passwordField.setText(""); + channelNameField.setText("jrummikub@muc.universe-factory.net"); + } + @Override public IEvent1<LoginData> getLoginEvent() { return loginEvent; diff --git a/src/jrummikub/view/impl/View.java b/src/jrummikub/view/impl/View.java index 5d870f9..06795aa 100644 --- a/src/jrummikub/view/impl/View.java +++ b/src/jrummikub/view/impl/View.java @@ -504,6 +504,10 @@ public class View extends JFrame implements IView { @Override public void showLoginPanel(boolean show) { loginPanel.setVisible(show); + + if (show) { + loginPanel.resetLoginPanel(); + } } @Override |