Changed layout to have buttons fill width.
This commit is contained in:
parent
b0c1dd10bc
commit
b0c1098110
@ -28,16 +28,20 @@ class LibraryConfigGUI {
|
||||
listLibraryFolders.setModel(listModel);
|
||||
mainPanel.add(listLibraryFolders, BorderLayout.CENTER);
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new BoxLayout(panel2, BoxLayout.PAGE_AXIS));
|
||||
panel2.setLayout(new GridBagLayout());
|
||||
GridBagConstraints constraints = new GridBagConstraints();
|
||||
constraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
constraints.weightx = 1;
|
||||
constraints.gridx = 0;
|
||||
mainPanel.add(panel2, BorderLayout.EAST);
|
||||
JButton addNewButton = new JButton();
|
||||
addNewButton.setText("Add New");
|
||||
addNewButton.addActionListener(e -> addNew());
|
||||
panel2.add(addNewButton);
|
||||
panel2.add(addNewButton, constraints);
|
||||
JButton removeButton = new JButton();
|
||||
removeButton.setText("Remove");
|
||||
removeButton.addActionListener(e -> removeSelected());
|
||||
panel2.add(removeButton);
|
||||
panel2.add(removeButton, constraints);
|
||||
return mainPanel;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user