import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class lez20070411 extends JFrame
{
	JTextArea areatesto;
	JMenuBar menubar;
	JMenu fileMenu;
	JMenuItem exitItem, openItem, saveItem, closeItem;
	
	public lez20070411()
	{
		setTitle("Prova menu");
		setSize(400,400);
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		exitItem = new JMenuItem("Esci");
		exitItem.setMnemonic('E');
		exitItem.addActionListener(new ActionListener(){	
			public void actionPerformed(ActionEvent e){
				System.exit(0); }});
		openItem = new JMenuItem("Apri");
		openItem.addActionListener(new ActionListener(){	
			public void actionPerformed(ActionEvent e){
				JFileChooser c = new JFileChooser();
				int h = c.showOpenDialog(null);
				}});
		saveItem = new JMenuItem("Salva");
		saveItem.addActionListener(new ActionListener(){	
			public void actionPerformed(ActionEvent e){
				}});
		closeItem = new JMenuItem("Chiudi");
		closeItem.addActionListener(new ActionListener(){	
			public void actionPerformed(ActionEvent e){
				}});
		


		fileMenu = new JMenu("File");
		fileMenu.setMnemonic('F');
		fileMenu.add(openItem);
		fileMenu.add(saveItem);
		fileMenu.add(closeItem);
		fileMenu.addSeparator();
		fileMenu.add(exitItem);

		menubar = new JMenuBar();
		menubar.add(fileMenu);
		
		setJMenuBar(menubar);
		

		areatesto = new JTextArea();
		JScrollPane jsp = new JScrollPane(areatesto);
		add(jsp);

		
		setVisible(true);

	}
	
	
	public static void main(String[] a)	{		lez20070411 f = new lez20070411();	}
}


class Pannello extends JPanel
{
	int dim;
	ArrayList coordinate;
	
	Pannello()
	{
		coordinate = new ArrayList();
	}
}
