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)); } }