aboutsummaryrefslogtreecommitdiff
path: root/src/UI/Components/MenuBar.java
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-11-16 02:16:16 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-11-16 02:16:16 +0530
commitda6b366397aa15e2686840c1d9ffa5dae5d49d2a (patch)
treea53bc42092a564bfbf66a67b70e3aa9cb8689798 /src/UI/Components/MenuBar.java
First Commit
Diffstat (limited to 'src/UI/Components/MenuBar.java')
-rw-r--r--src/UI/Components/MenuBar.java29
1 files changed, 29 insertions, 0 deletions
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));
+ }
+}