public static int getHoveredRow(@NotNull JTable table) {
    Object property = table.getClientProperty(HOVERED_ROW_KEY);
    return property instanceof Integer ? (Integer)property : -1;
  }
public static int getHoveredRow(@NotNull JTable table)