package main.java.gui;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;


public class MainWindow extends JFrame implements ActionListener {

	private GamePanel gamePanel;

	private JMenuBar menuBar;
	private JMenu menuPartie;
	private JMenuItem itemQuitter;

	public MainWindow()
	{
		super("Eternity");
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setResizable(false);

		this.constructMenu();
		this.gamePanel = new GamePanel();
		// JFrame.add points to JContentPane.add
		// ContentPane has BorderLayout by default
		this.add(this.gamePanel);

		this.setVisible(true);
		this.pack();
	}

	private void constructMenu()
	{
		menuBar = new JMenuBar();
		menuPartie = new JMenu("Partie");

		itemQuitter = new JMenuItem("Quitter");
		itemQuitter.addActionListener(this);

		menuPartie.add(itemQuitter);

		menuBar.add(menuPartie);

		this.setJMenuBar(menuBar);
	}

	public GamePanel getGamePanel() {
		return this.gamePanel;
	}

	/*
	* Events response implementations
	*/

	public void actionPerformed(ActionEvent e)
	{
		this.dispose();
	}
}

@@ -416,16 +416,112 @@
 Quitter;
+%0A%09private JMenuItem itemSauver;%0A%09private JMenuItem itemCharger;%0A%09private JMenuItem itemNouvelle;
 %0A%0A%09publi
@@ -962,16 +962,396 @@
 tie%22);%0A%0A
+%0A%09%09itemNouvelle = new JMenuItem(%22Nouvelle partie%22);%0A%09%09itemNouvelle.addActionListener(this);%0A%0A%09%09menuPartie.add(itemNouvelle);%0A%09%09%0A%09%09itemSauver = new JMenuItem(%22Sauvegarder la partie%22);%0A%09%09itemSauver.addActionListener(this);%0A%0A%09%09menuPartie.add(itemSauver);%0A%0A%09%09itemCharger = new JMenuItem(%22Charger la partie%22);%0A%09%09itemCharger.addActionListener(this);%0A%0A%09%09menuPartie.add(itemCharger);%0A%09%09%0A%0A
 %09%09itemQu
@@ -1455,17 +1455,19 @@
 itter);%0A
+%09%09
 %0A
-
 %09%09menuBa
@@ -1674,16 +1674,60 @@
 t e)%0A%09%7B%0A
+%09%09if(e.getSource() == (Object)itemQuitter)%0A%09
 %09%09this.d

Add menu items for new, load and save game