public static JMenuBar createMenuBar()
	{
		JMenuBar menuBarUpper = new JMenuBar();		//define and initialized menuBarUpper
		menuBarUpper.setBackground(new Color(windowColor));
		f.setJMenuBar(menuBarUpper);			//add the menuBarUpper to the frame

		JMenu fileMenu = new JMenu("File");		//create the "file" menu
		JMenu insertMenu = new JMenu("Insert");
		JMenu toolsMenu = new JMenu("Tools");
		JMenu HelpMenu = new JMenu("Help");		//create "help" menu

		menuBarUpper.add(fileMenu);							//add the "file" menu to the bar
		menuBarUpper.add(insertMenu);
		menuBarUpper.add(toolsMenu);
		menuBarUpper.add(HelpMenu);							//add "help" menu to the bar

		JMenuItem newItem = new JMenuItem("New");
		newItem.setAccelerator(KeyStroke.getKeyStroke('N', KeyEvent.CTRL_DOWN_MASK));
		/*		
		JMenuItem loadItem = new JMenuItem("Load");					//create the open
		loadItem.setAccelerator(KeyStroke.getKeyStroke('O', KeyEvent.CTRL_DOWN_MASK));
		 */		
		final JMenuItem loadDataItem = new JMenuItem("Load Data");					//del

		final JMenuItem saveItem = new JMenuItem("Save");					//create the save
		saveItem.setAccelerator(KeyStroke.getKeyStroke('S', KeyEvent.CTRL_DOWN_MASK));

		JMenuItem exit = new JMenuItem("Exit");						//create the exit

		final JMenuItem computePLEItem = new JMenuItem("Compute PLE");
		final JMenuItem insertAPItem = new JMenuItem("Insert AP");
		final JMenuItem SigmaItem = new JMenuItem("Insert Sigma");
		final JMenuItem manageAPsItem = new JMenuItem("Manage Access Points");
		final JMenuItem changeScaleItem = new JMenuItem("Change map scale");
		final JMenuItem smoothResItem = new JMenuItem("Smooth resolution");
		final JMenuItem HAPsItem = new JMenuItem("hypothetical AP's");

		JMenuItem aboutItem = new JMenuItem("About WiMAP");			//create the about 

		newItem.setToolTipText("New project");		//tool tip (on mouse hover)
		//		loadItem.setToolTipText("Open Floor Plan");		//tool tip (on mouse hover)
		saveItem.setToolTipText("Save Map");			//tool tip (on mouse hover)
		exit.setToolTipText("Exit application");		//tool tip (on mouse hover)
		smoothResItem.setToolTipText("Effects speed");		//??

		fileMenu.add(newItem);			//add the new to the "file" menu
		//		fileMenu.add(loadItem);			//add the open to the "file" menu
		fileMenu.add(loadDataItem);		
		fileMenu.add(saveItem);			//add the save to the "file" menu
		fileMenu.add(exit);				//add the exit to the "file" menu

		insertMenu.add(insertAPItem);
		insertMenu.add(SigmaItem);
		insertMenu.add(HAPsItem);

		toolsMenu.add(computePLEItem);
		toolsMenu.add(manageAPsItem);
		toolsMenu.add(changeScaleItem);
		toolsMenu.add(smoothResItem);

		HelpMenu.add(aboutItem);		//add the about to the "Help" menu

		/*******************************File Menu******************************************/
		// NEW 
		newItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {

				try {
					newActionPerformed (event);
				} catch (Exception e)
				{
					return;
				}
				saveItem.setEnabled(true);
				loadDataItem.setEnabled(true);
				insertAPItem.setEnabled(true);
				computePLEItem.setEnabled(true);
				manageAPsItem.setEnabled(true);
				changeScaleItem.setEnabled(true);
				smoothResItem.setEnabled(true);
				HAPsItem.setEnabled(true);
				SigmaItem.setEnabled(true);

			}
		});

		// OPEN
		/*		loadItem.addActionListener(new ActionListener() {		//action listener for open
			public void actionPerformed(ActionEvent event) {
				boolean flag = true ;
				try {

					openActionPerformed (event);
				} catch (Exception e)
				{
					flag = false ;
				}
				saveItem.setEnabled(flag);
			}
		});
		 */
		loadDataItem.addActionListener(new ActionListener() {		//action listener for open
			public void actionPerformed(ActionEvent event) {
				try {

					loadtextActionPerformed (event);
				} catch (Exception e)
				{
					return;
				}
				saveItem.setEnabled(true);
			}
		});		// SAVE
		saveItem.addActionListener(new ActionListener() {		//action listener for open
			public void actionPerformed(ActionEvent event) {
				saveActionPerformed (event);
			}		
		});
		saveItem.setEnabled(false);

		// EXIT
		exit.addActionListener(new ActionListener() {			//action listener for exit
			public void actionPerformed(ActionEvent event) {
				System.exit(0);
			}

		});

		/*******************************Tool Menu******************************************/
		computePLEItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				panelCanvas.compute_n();
			}
		});
		computePLEItem.setEnabled(false);

		manageAPsItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				new MngAP();
			}
		});
		manageAPsItem.setEnabled(false);

		insertAPItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				try {
					insertapdialog = new InsertAPDialog(panelCanvas);
					insertapdialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					insertapdialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
		insertAPItem.setEnabled(false);

		SigmaItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				panelCanvas.InsertSigma();
			}
		});

		changeScaleItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				panelCanvas.removeMouseListener(panelCanvas.samplingML);
				JOptionPane.showMessageDialog(null, "To rescale\nClick on two points and enter the real distance between them in meters" );
				panelCanvas.addMouseListener(panelCanvas.scalingML);				
			}
		});
		changeScaleItem.setEnabled(false);

		smoothResItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				try {
					resolutionDialog dialog = new resolutionDialog(panelCanvas);
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
				/*try {
					String input = JOptionPane.showInputDialog(null, "Enter size of square in pixels", ""); // ??
					if (panelCanvas.setSmoothRes(Integer.parseInt(input)))
						JOptionPane.showMessageDialog(null, "New smooth Resolution : " + panelCanvas.getSmoothRes());
					else
						JOptionPane.showMessageDialog(null, "Invalid input, will restore default resolution\nSmooth Resolution: " + panelCanvas.getSmoothRes());
				}
				catch (Exception e)
				{
					e.printStackTrace();
				}*/

			}
		});
		smoothResItem.setEnabled(false);

		HAPsItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent event) {
				panelCanvas.H_APs();
			}
		});
		HAPsItem.setEnabled(false);

		/*******************************Help Menu******************************************/
		aboutItem.addActionListener(new ActionListener() {			//action listener for about
			public void actionPerformed(ActionEvent event) {
				aboutActionPerformed (event);
			}
		});

		return menuBarUpper ;
	}