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.gridwidth = 1;
|
||||||
c.weighty = 0;
|
c.weighty = 0;
|
||||||
|
|
||||||
JButton loginButton = new JButton("Login");
|
JButton loginButton = new JButton("Login");
|
||||||
loginButton.addActionListener(new ActionListener() {
|
loginButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent arg0) {
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
loginEvent.emit(userNameField.getText(),
|
loginEvent.emit(userNameField.getText(), passwordField.getText(),
|
||||||
passwordField.getText(), channelNameField.getText());
|
channelNameField.getText());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
add(loginButton, c);
|
add(loginButton, c);
|
||||||
|
|
||||||
|
c.weightx = 0;
|
||||||
|
add(Box.createHorizontalStrut(10), c);
|
||||||
|
|
||||||
c.gridwidth = GridBagConstraints.REMAINDER;
|
c.gridwidth = GridBagConstraints.REMAINDER;
|
||||||
|
c.weightx = 1;
|
||||||
JButton cancelButton = new JButton("Abbrechen");
|
JButton cancelButton = new JButton("Abbrechen");
|
||||||
cancelButton.addActionListener(new ActionListener() {
|
cancelButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -65,8 +68,8 @@ class LoginPanel extends JPanel implements ILoginPanel {
|
||||||
});
|
});
|
||||||
add(cancelButton, c);
|
add(cancelButton, c);
|
||||||
|
|
||||||
setBorder(new CompoundBorder(new LineBorder(Color.BLACK),
|
setBorder(new CompoundBorder(new LineBorder(Color.BLACK), new EmptyBorder(
|
||||||
new EmptyBorder(10, 10, 10, 10)));
|
10, 10, 10, 10)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Reference in a new issue