From 5e256aee19856cc04331a64354ff392c50bfbd71 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Fri, 9 Feb 2024 01:50:55 +0100 Subject: [PATCH] =?UTF-8?q?Menue=20Punkte=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ChatGUI.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/ChatGUI.java b/src/main/java/ChatGUI.java index 645f2c4..33a6cb7 100644 --- a/src/main/java/ChatGUI.java +++ b/src/main/java/ChatGUI.java @@ -7,12 +7,14 @@ import java.awt.event.ActionListener; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; +import javax.swing.JMenuItem; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; public class ChatGUI implements ActionListener { - + + JMenuItem exit = new JMenuItem("Exit"); JTextField inputTextField = new JTextField(); JTextArea outputTextArea = new JTextArea(); @@ -29,8 +31,13 @@ public class ChatGUI implements ActionListener { JMenuBar bar = new JMenuBar(); gui.setJMenuBar(bar); + + JMenu options = new JMenu("options"); JMenu menu = new JMenu("File"); + menu.add(exit); + menu.add(options); + bar.add(menu); bar.add(menu);