diff --git a/bin/.gitignore b/bin/.gitignore index f472201..f4cdb54 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -14,3 +14,4 @@ /jaggob$2.class /jaggob.class /GUI$9.class +/GUI$10.class diff --git a/bin/GUI$1.class b/bin/GUI$1.class index dc6e528..6db05ce 100644 Binary files a/bin/GUI$1.class and b/bin/GUI$1.class differ diff --git a/bin/GUI$2.class b/bin/GUI$2.class index bcc951c..7ab31ed 100644 Binary files a/bin/GUI$2.class and b/bin/GUI$2.class differ diff --git a/bin/GUI$3.class b/bin/GUI$3.class index a4ce4b7..9eb146c 100644 Binary files a/bin/GUI$3.class and b/bin/GUI$3.class differ diff --git a/bin/GUI$4.class b/bin/GUI$4.class index 8cea1e4..2ca205b 100644 Binary files a/bin/GUI$4.class and b/bin/GUI$4.class differ diff --git a/bin/GUI$5.class b/bin/GUI$5.class index 96a7558..65fc96f 100644 Binary files a/bin/GUI$5.class and b/bin/GUI$5.class differ diff --git a/bin/GUI$6.class b/bin/GUI$6.class index 2c46dd7..f4af9d5 100644 Binary files a/bin/GUI$6.class and b/bin/GUI$6.class differ diff --git a/bin/GUI$7.class b/bin/GUI$7.class index 9b7e247..944ef1b 100644 Binary files a/bin/GUI$7.class and b/bin/GUI$7.class differ diff --git a/bin/GUI$8.class b/bin/GUI$8.class index d3f9a4f..3386929 100644 Binary files a/bin/GUI$8.class and b/bin/GUI$8.class differ diff --git a/bin/GUI$SoundJLayer.class b/bin/GUI$SoundJLayer.class index 02e8cee..b15c64e 100644 Binary files a/bin/GUI$SoundJLayer.class and b/bin/GUI$SoundJLayer.class differ diff --git a/bin/GUI.class b/bin/GUI.class index 04cb7d8..953b949 100644 Binary files a/bin/GUI.class and b/bin/GUI.class differ diff --git a/src/GUI.java b/src/GUI.java index f7ce799..52fd37b 100644 --- a/src/GUI.java +++ b/src/GUI.java @@ -25,6 +25,7 @@ import java.awt.Component; import java.awt.Cursor; import java.awt.EventQueue; import java.awt.Font; +import java.awt.MenuBar; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; @@ -42,6 +43,9 @@ import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; @@ -67,6 +71,10 @@ public class GUI extends JFrame { //Init private JButton btn_browse; + private JMenuBar menubar; + private JMenu file; + private JMenuItem exit; + ////////////////////////////////////////////////////////////// @@ -170,8 +178,26 @@ public class GUI extends JFrame { contentPane.add(textField); textField.setColumns(10); - //browse Button hinzufügen + //Menübar einrichten + + menubar = new JMenuBar(); + file = new JMenu("File..."); + exit = new JMenuItem("Exit"); + exit.addActionListener(new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + System.exit(0); + } + }); + + file.add(exit); + menubar.add(file); + setJMenuBar(menubar); + + + //browse Button hinzufügen btn_browse = new JButton("..."); btn_browse.setBounds(1065, 14, 20, 20); btn_browse.addActionListener(new ActionListener() {