/**
*Text genereted by Simple GUI Extension for BlueJ
*/
import javax.swing.UIManager.LookAndFeelInfo;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.border.Border;
import javax.swing.*;


public class FlightInfo extends JFrame {

	private JMenuBar menuBar;
	private JPanel GPS_Warning;
	private JPanel Navigation;

	//Constructor 
	public FlightInfo(){

		this.setTitle("FlightInfo");
		this.setSize(480,800);
		//menu generate method
		generateMenu();
		this.setJMenuBar(menuBar);

		//pane with null layout
		JPanel contentPane = new JPanel(null);
		contentPane.setPreferredSize(new Dimension(480,800));
		contentPane.setBackground(new Color(192,192,192));


		GPS_Warning = new JPanel(null);
		GPS_Warning.setBorder(BorderFactory.createEtchedBorder(1));
		GPS_Warning.setBounds(5,404,470,390);
		GPS_Warning.setBackground(new Color(214,217,223));
		GPS_Warning.setForeground(new Color(0,0,0));
		GPS_Warning.setEnabled(true);
		GPS_Warning.setFont(new Font("DejaVu Sans",0,12));
		GPS_Warning.setVisible(true);

		Navigation = new JPanel(null);
		Navigation.setBorder(BorderFactory.createEtchedBorder(1));
		Navigation.setBounds(5,5,470,395);
		Navigation.setBackground(new Color(214,217,223));
		Navigation.setForeground(new Color(0,0,0));
		Navigation.setEnabled(true);
		Navigation.setFont(new Font("DejaVu Sans",0,12));
		Navigation.setVisible(true);

		//adding components to contentPane panel
		contentPane.add(GPS_Warning);
		contentPane.add(Navigation);

		//adding panel to JFrame and seting of window position and close operation
		this.add(contentPane);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setLocationRelativeTo(null);
		this.pack();
		this.setVisible(true);
	}

	//method for generate menu
	public void generateMenu(){
		menuBar = new JMenuBar();

		JMenu file = new JMenu("File");
		JMenu tools = new JMenu("Tools");
		JMenu help = new JMenu("Help");

		JMenuItem open = new JMenuItem("Open   ");
		JMenuItem save = new JMenuItem("Save   ");
		JMenuItem exit = new JMenuItem("Exit   ");
		JMenuItem preferences = new JMenuItem("Preferences   ");
		JMenuItem about = new JMenuItem("About   ");


		file.add(open);
		file.add(save);
		file.addSeparator();
		file.add(exit);
		tools.add(preferences);
		help.add(about);

		menuBar.add(file);
		menuBar.add(tools);
		menuBar.add(help);
	}



	 public static void main(String[] args){
		System.setProperty("swing.defaultlaf", "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		javax.swing.SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				new FlightInfo();
			}
		});
	}

}
