public void actionPerformed( ActionEvent e )
   {
      int answer = -1;
      String type = null;
      /*
        The user is promptet on exit if confirmdialogs are
        turned on in the GuiDconfig.xml file.
       */
      if( e.getSource() == cmdQuit )
      {
            answer = JOptionPane.showConfirmDialog( null, "Leaving The GuiD so soon?", 
                                                    "GuiD Confirmation", JOptionPane.YES_NO_OPTION ); 

         if( answer == JOptionPane.YES_OPTION)
         {
	System.exit( 0 );
         }
      }
      /*
        Opens existing project.
        Starts the filedialog in the user's "GuiD files path" 
        if so is specified in the GuiDconfig file.
        If not, the dialog is opened in the user home directory.
       */
      else if( e.getSource() == cmdExistingProject )
      {
			JFileChooser jfc = new JFileChooser();
			FileNameExtensionFilter filter = new FileNameExtensionFilter("GuiD Project File", "GuiD");
			jfc.setFileFilter(filter);
			if(jfc.showOpenDialog(this)==JFileChooser.APPROVE_OPTION)
			{
     		    this.setCursor( new Cursor( Cursor.WAIT_CURSOR ) );
				msg.openExistingProject(jfc.getSelectedFile());
				this.dispose();
			}
      }
      else if( e.getSource() == app )
      {
         type = "Applet";
      }
      else if( e.getSource() == japp )
      {
         type = "JApplet";
      }
      else if( e.getSource() == frm )
      {
         type = "Frame";

      }
      else if( e.getSource() == jfrm )
      {
         type = "JFrame";
      }
      /*
        Sets the type of application in the JGuiD and disposes itself.
        The startNewProject() method in JGuiD then starts the show.
       */
	   if(type!=null)
	   {
		 this.setCursor( new Cursor( Cursor.WAIT_CURSOR ) );
		 msg.startNewProject( type );
         this.dispose();
	   }
   }