public void closeAllFiles(){
  while (tabbedPane.getTabCount() > 0) {
    if (!saveChanges(true)) {
      return;
    }
    tabbedPane.removeTabAt(getCurrentIndex());
    updateFrameTitle();
    System.gc();
  }
}

public void closeAllFiles ( ) { while ( tabbedPane . getTabCount ( ) > 0 ) { if ( ! saveChanges ( true ) ) { return ; } tabbedPane . removeTabAt ( getCurrentIndex ( ) ) ; updateFrameTitle ( ) ; System . gc ( ) ; } }
closes all open files
