summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/LoginPanel.java10
-rw-r--r--src/jrummikub/view/impl/View.java4
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