Fix in LoginPanel

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@568 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Jannis Harder 2011-06-22 02:00:04 +02:00
parent ea8a675cee
commit 79ae31b1c7

View file

@ -77,8 +77,8 @@ class LoginPanel extends JPanel implements ILoginPanel {
});
add(cancelButton, c);
setBorder(new CompoundBorder(new LineBorder(Color.BLACK), new EmptyBorder(
10, 10, 10, 10)));
setBorder(new CompoundBorder(new LineBorder(Color.BLACK),
new EmptyBorder(10, 10, 10, 10)));
}
private ActionListener createInputFields() {
@ -99,7 +99,7 @@ class LoginPanel extends JPanel implements ILoginPanel {
channelNameField.addActionListener(loginAction);
startDedicatedServerButton = new JButton("Dedizierten Server starten");
// this fixes some strange layouting bug
startDedicatedServerButton.setPreferredSize(new Dimension(500,10));
startDedicatedServerButton.setPreferredSize(new Dimension(500, 10));
return loginAction;
}
@ -144,7 +144,8 @@ class LoginPanel extends JPanel implements ILoginPanel {
private void login() {
loginEvent.emit(new LoginData(userNameField.getText(), serverNameField
.getText(), passwordField.getText(), channelNameField.getText()));
.getText(), passwordField.getText().isEmpty() ? "jrummikub"
: passwordField.getText(), channelNameField.getText()));
}
@Override
@ -159,6 +160,8 @@ class LoginPanel extends JPanel implements ILoginPanel {
@Override
public void setDedicatedServerRunning(boolean running) {
startDedicatedServerButton.setText(running ? "Dedizierten Server nutzen" : "Dedizierten Server starten");
startDedicatedServerButton
.setText(running ? "Dedizierten Server nutzen"
: "Dedizierten Server starten");
}
}