code: static public Insets getScreenInsets(Window windowOrNull) {
          Insets insets;
          if (windowOrNull == null) {
              insets = Toolkit.getDefaultToolkit().getScreenInsets(GraphicsEnvironment
                  .getLocalGraphicsEnvironment().getDefaultScreenDevice()
                  .getDefaultConfiguration());
          } else {
              insets = windowOrNull.getToolkit().getScreenInsets(
                  windowOrNull.getGraphicsConfiguration());
          }
          return insets;
      }
docs: getScreenInsets, This returns the insets of the screen, which are defined by any task bars
  that have been set up by the user. 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.