From da6b366397aa15e2686840c1d9ffa5dae5d49d2a Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 16 Nov 2024 02:16:16 +0530 Subject: First Commit --- src/UI/Components/MenuBar.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/UI/Components/MenuBar.java (limited to 'src/UI/Components/MenuBar.java') diff --git a/src/UI/Components/MenuBar.java b/src/UI/Components/MenuBar.java new file mode 100644 index 0000000..454bb83 --- /dev/null +++ b/src/UI/Components/MenuBar.java @@ -0,0 +1,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)); + } +} -- cgit v1.2.3