gt: 		new ControlFrame ().setVisible (true);
context: /*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  package imagedisplay;
  
  /**
   *
   * @author 065194623
   *
   * This JFrame is the window that opens to explain the controls used in the game
   */
  public class ControlFrame extends javax.swing.JFrame
  {
  
      //This is the constructor for the ControlFrame class, which require no parameters
      public ControlFrame ()
      {
  
  	//Calls the initComponents () method which instantiates all the components in the JFrame, adds them to the JFrame,
  	//as well as setting their position and size.
  	initComponents ();
  
  	//Sets the title of the window to the String value "Controls"
  	setTitle ("Controls");
  
  	//Sets the location of the JFrame itself on the screen
  	setLocation (400, 300);
      }
  
  
      /**
       * This method is called from within the constructor to initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is always
       * regenerated by the Form Editor.
       *
       * The following code is automatically created by the NetBeans GUI manager
       */
      @ SuppressWarnings ("unchecked")
  	// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  	private void initComponents ()
      {
  
  	//Instantiates a new object of the JLayeredPane class called jLayeredPane1
  	jLayeredPane1 = new javax.swing.JLayeredPane ();
  
  	//Instantiates a new object of the JTextArea class called jTextArea1
  	jTextArea1 = new javax.swing.JTextArea ();
  
  	//Instantiates a new object of the JLabel class called jLabel1
  	jLabel1 = new javax.swing.JLabel ();
  
  	//Instantiates a new object of the JLabel class called jLabel2
  	jLabel2 = new javax.swing.JLabel ();
  
  
  	//Sets the behaviour of the exit button to close the frame on click
  	setDefaultCloseOperation (javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  
  	//Sets this JFrame to always appear on top of other windows
  	setAlwaysOnTop (true);
  
  	//Sets this Jframe to be non-resizeable
  	setResizable (false);
  
  	//Adds a new keylistner to this JFrame
  	addKeyListener (new java.awt.event.KeyAdapter ()
  	{
  	    //This method is called when a key is pressed
  	    public void keyPressed (java.awt.event.KeyEvent evt)
  	    {
  		//Calls the formKeyPressed method below passing the KeyEvent object evt to the method
  		formKeyPressed (evt);
  	    }
  	}
  	);
  
  	//jTextArea1 properties code
  	//--------------------------
  
  	//Sets the number of columns in the jTextArea1 object to 20
  	jTextArea1.setColumns (20);
  
  	//Sets the text are to be non-ediatable
  	jTextArea1.setEditable (false);
  
  	//Sets the number of rows in the jTextArea1 object to 5
  	jTextArea1.setRows (5);
  
  	//Sets the text that appears in the jTextArea1 object
  	jTextArea1.setText ("Keys\tAction\n\nEsc\tBrings up the\n\tin game\t\n\tmenu.\nEnter\tChanges the \n\tMap");
  
  	//Sets the jTextArea1 object to not request focus for the purpose of keylistners
  	jTextArea1.setFocusable (false);
  
  	//Sets the location and size of the jTextArea1 object
  	jTextArea1.setBounds (10, 10, 220, 130);
  
  	//Adds the jTextArea1 object to the jLayeredPane1 object on the upermost layer: POPUP_LAYER
  	jLayeredPane1.add (jTextArea1, javax.swing.JLayeredPane.POPUP_LAYER);
  
  
  	//jLabel1 properties code
  	//-----------------------
  
  	//Sets the background image of the label to a new ImageIcon corresponding to an image in the resources package
  	jLabel1.setIcon (new javax.swing.ImageIcon (getClass ().getResource ("/imagedisplay/resources/GreenPlanets.jpg"))); // NOI18N
  
  	//Sets the jLabel1 object to not request focus for the purpose of keylistners
  	jLabel1.setFocusable (false);
  
  	//Sets the size and location of the jLabel1 object
  	jLabel1.setBounds (0, 0, 240, 170);
  
  	//Adds the jlabel1 object to the jLayeredPane1 object on the lowest layer: DEFAULT_LAYER
  	jLayeredPane1.add (jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);
  
  	//jLabel2 properties code
  	//-----------------------
  
  	//Sets the text color of the jLabel2 object to [182, 155, 18], which is gold
  	jLabel2.setForeground (new java.awt.Color (182, 155, 18));
  
  	//Sets the text contained in the jLabel2 object to the String: "     Press any key to close"
  	jLabel2.setText ("     Press any key to close");
  
  	//Sets the jLabel2 object to not request focus for the purpose of keylistners
  	jLabel2.setFocusable (false);
  
  	//Sets the size and location of the jLabel2 object
  	jLabel2.setBounds (10, 140, 220, -1);
  
  	//Adds the jlabel2 object to the jLayeredPane1 object on the upermost layer: POPUP_LAYER
  	jLayeredPane1.add (jLabel2, javax.swing.JLayeredPane.POPUP_LAYER);
  
  	
  	//jLayeredPane1 properties code
  	//-----------------------------
  
  	//Creates a new GroupLayout object for the container returned by the getContentPane () method
  	javax.swing.GroupLayout layout = new javax.swing.GroupLayout (getContentPane ());
  
  	//Sets the layout of the container returned by getContentPane to the layout delcared above
  	getContentPane ().setLayout (layout);
  
  	//Adds the jLayeredPane1 object to the JFrame, with a preferred size of 239,171
  	layout.setHorizontalGroup (
  		layout.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING)
  		.addComponent (jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
  		);
  	layout.setVerticalGroup (
  		layout.createParallelGroup (javax.swing.GroupLayout.Alignment.LEADING)
  		.addComponent (jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
  		);
  
  	//resizes the JFrame to fit the preferred size of it's components
  	pack ();
      } // </editor-fold>//GEN-END:initComponents
  
  
      //This method is called every time a key is pressed on this JFrame
      private void formKeyPressed (java.awt.event.KeyEvent evt)
      { //GEN-FIRST:event_formKeyPressed
  
  	//Closes the JFrame
  	dispose ();
      } //GEN-LAST:event_formKeyPressed
  
  
      /**
       * @param args the command line arguments
       */
  
      //The main method of the class, created by NetBeans
      public static void main (String args[])
      {
  	//The code below was created by NetBeans and sets the look and feel of the JFrame
  
  	//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  	/*
  	 * If Nimbus (introduced in Java SE 6) is not available, stay with the
  	 * default look and feel. For details see
  	 * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  	 */
  	try
  	{
  	    for (javax.swing.UIManager.LookAndFeelInfo info:
  	    javax.swing.UIManager.getInstalledLookAndFeels ())
  	    {
  		if ("Nimbus".equals (info.getName ()))
  		{
  		    javax.swing.UIManager.setLookAndFeel (info.getClassName ());
  		    break;
  		}
  	    }
  	}
  	catch (ClassNotFoundException ex)
  	{
  	    java.util.logging.Logger.getLogger (ControlFrame.class.getName ()).log (java.util.logging.Level.SEVERE, null, ex);
  	}
  	catch (InstantiationException ex)
  	{
  	    java.util.logging.Logger.getLogger (ControlFrame.class.getName ()).log (java.util.logging.Level.SEVERE, null, ex);
  	}
  	catch (IllegalAccessException ex)
  	{
  	    java.util.logging.Logger.getLogger (ControlFrame.class.getName ()).log (java.util.logging.Level.SEVERE, null, ex);
  	}
  	catch (javax.swing.UnsupportedLookAndFeelException ex)
  	{
  	    java.util.logging.Logger.getLogger (ControlFrame.class.getName ()).log (java.util.logging.Level.SEVERE, null, ex);
  	}
  	//</editor-fold>
  	//End of the Look and feel code
  
  	//Adds the run () method to the AWT Event queue, so that it is executed
  	//after the previous tasks are completed
  	java.awt.EventQueue.invokeLater (new Runnable ()
  	{
  
  	    public void run ()
  	    {
  		//Creates a new object of the ControlFrame class, and sets it
  		//to a visible state
  