blob: 454bb83eda9b1961de981a94f3975d6fa69d532f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package UI.Components;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
public class MenuBar extends JPanel {
public JButton settingsButton;
public JButton startStopButton;
public JButton addBookButton;
public MenuBar() {
settingsButton = new JButton("Settings");
this.add(settingsButton);
this.add(Box.createRigidArea(new Dimension(15, 0)));
startStopButton = new JButton("Start Server");
this.add(startStopButton);
this.add(Box.createHorizontalGlue());
addBookButton = new JButton("Add Book");
this.add(addBookButton);
this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
this.setBorder(new EmptyBorder(8, 8, 4, 8));
}
}
|