Add padding between buttons in login panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@401 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
82eb3eb24e
commit
5fe8b50012
1 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Reference in a new issue