code: public static void closeWindows(Window... ignoredWindows) {
          Window[] ws = Window.getWindows();
          for (Window w : ws) {
              if (!contains(ignoredWindows, w)) w.dispose();
          }
      }
docs: Close all windows.
  
  @param ignoredWindows The windows to ignore