public class GUI extends JFrame {
// Anfang Attribute
Spiel Spiel = new Spiel();
private JTextArea Area = new JTextArea("");
private Bildanzeige Bild = new Bildanzeige("Bilder/Testbild.jpg");
private JButton Vorne = new JButton();
private JButton Links = new JButton();
private JButton Rechts = new JButton();
private JButton Hinten = new JButton();
private JButton Hoch = new JButton();
private JButton Runter = new JButton();
private JButton Aktion1 = new JButton();
private JButton Aktion2 = new JButton();
private JButton Aktion3 = new JButton();
private JButton Aktion4 = new JButton();
private JButton Aktion5 = new JButton();
private JButton Inventar = new JButton();
private JButton Notizbuch = new JButton();
private String[] jList1Data = {};
private JList InventarListe = new JList(jList1Data);
private String[] jList2Data = {};
private JList NotizListe = new JList(jList2Data);
private JButton Start = new JButton();
// Ende Attribute
public GUI(String title)
{
// Frame-Initialisierung
super(title);
setDefaultCloseOperation(WindowConstants.EXIT_ON_C LOSE);
int frameWidth = 1200;
int frameHeight = 750;
setSize(frameWidth, frameHeight);
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
int x = (d.width - getSize().width) / 2;
int y = (d.height - getSize().height) / 2;
setLocation(x, y);
Container cp = getContentPane();
cp.setLayout(null);
// Anfang Komponenten
[Die Komponenten hab ich mal rausgeschnitten..sind nur Buttons, Textareas usw.]
////////////////////// Anfang Methoden \\\\\\\\\\\\\\\\\\\\\\\\\\
[Habe auch hier alle Methoden entfernt die nichts mit meinem Problem zu tun haben]