code: static public Rectangle getScreenTotalArea(Window windowOrNull) {
          Rectangle bounds;
          if (windowOrNull == null) {
              GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
              bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();
          } else {
              GraphicsConfiguration gc = windowOrNull.getGraphicsConfiguration();
              bounds = gc.getBounds();
          }
          return bounds;
      }
docs: getScreenTotalArea, This returns the total area of the screen. (The total area includes any
  task bars.) This function accounts for multi-monitor setups. If a window is supplied, then
  the the monitor that contains the window will be used. If a window is not supplied, then the
  primary monitor will be used.