Browse Source

Menue Punkte hinzugefügt

remotes/origin/server
Paul Kattenborn 11 months ago
parent
commit
5e256aee19
  1. 7
      src/main/java/ChatGUI.java

7
src/main/java/ChatGUI.java

@ -7,12 +7,14 @@ import java.awt.event.ActionListener;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JMenu; import javax.swing.JMenu;
import javax.swing.JMenuBar; import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JTextField; import javax.swing.JTextField;
public class ChatGUI implements ActionListener { public class ChatGUI implements ActionListener {
JMenuItem exit = new JMenuItem("Exit");
JTextField inputTextField = new JTextField(); JTextField inputTextField = new JTextField();
JTextArea outputTextArea = new JTextArea(); JTextArea outputTextArea = new JTextArea();
@ -30,7 +32,12 @@ public class ChatGUI implements ActionListener {
JMenuBar bar = new JMenuBar(); JMenuBar bar = new JMenuBar();
gui.setJMenuBar(bar); gui.setJMenuBar(bar);
JMenu options = new JMenu("options");
JMenu menu = new JMenu("File"); JMenu menu = new JMenu("File");
menu.add(exit);
menu.add(options);
bar.add(menu);
bar.add(menu); bar.add(menu);

Loading…
Cancel
Save