public void exitRoutine()
  {
    boolean exit = true ;

    TGlobal.config.setDirectInt( "mainWidth", this.getWidth() ) ;
    TGlobal.config.setDirectInt( "mainHeight", this.getHeight() ) ;

    // ask - save data ?
    if ( TGlobal.projects.isProjectChanged() )
    {
      int result = JOptionPane.showConfirmDialog( null,
                                                  "Project has changed - exit without saving files ?",
                                                  "Exit Question/Warning",
                                                  JOptionPane.YES_NO_OPTION ) ;

      if ( result != JOptionPane.YES_OPTION )
      {
        exit = false ;
      }
    }

    if ( exit )
    {
      // save the configuration
      try
      {
        // save the current project
        TGlobal.config.setLastProject( TGlobal.projects.getCurrentProject().getProjectFile()) ;
        TGlobal.config.save() ;
      }
      catch ( Exception e )
      {
        JOptionPane.showMessageDialog( null,
                                       "could not save the current configuration",
                                       "save configuration",
                                       JOptionPane.ERROR_MESSAGE
            ) ;
      }

      System.exit( 0 ) ;
    }
  }