diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-10 17:43:16 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-10 17:43:16 +0200 |
commit | 5fe8b50012514bcd3b5a139246a7035c90bfe37c (patch) | |
tree | 84595eac0806c4a363362ce1c35a5b6da2684ede /src | |
parent | 82eb3eb24ef823d89e5328089cea5c41bd465a50 (diff) | |
download | JRummikub-5fe8b50012514bcd3b5a139246a7035c90bfe37c.tar JRummikub-5fe8b50012514bcd3b5a139246a7035c90bfe37c.zip |
Add padding between buttons in login panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@401 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/view/impl/LoginPanel.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/jrummikub/view/impl/LoginPanel.java b/src/jrummikub/view/impl/LoginPanel.java index ca9f37f..d6260ff 100644 --- a/src/jrummikub/view/impl/LoginPanel.java +++ b/src/jrummikub/view/impl/LoginPanel.java @@ -44,18 +44,21 @@ class LoginPanel extends JPanel implements ILoginPanel { c.gridwidth = 1; c.weighty = 0; - JButton loginButton = new JButton("Login"); loginButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { - loginEvent.emit(userNameField.getText(), - passwordField.getText(), channelNameField.getText()); + loginEvent.emit(userNameField.getText(), passwordField.getText(), + channelNameField.getText()); } }); add(loginButton, c); + c.weightx = 0; + add(Box.createHorizontalStrut(10), c); + c.gridwidth = GridBagConstraints.REMAINDER; + c.weightx = 1; JButton cancelButton = new JButton("Abbrechen"); cancelButton.addActionListener(new ActionListener() { @Override @@ -65,8 +68,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))); } @Override |