code: private Rectangle getHDropLineRect(JTable.DropLocation loc) {
          if (!loc.isInsertRow()) {
              return null;
          }
  
          int row = loc.getRow();
          int col = loc.getColumn();
  
          if (col >= table.getColumnCount()) {
              col--;
          }
  
          Rectangle rect = table.getCellRect(row, col, true);
  
          if (row >= table.getRowCount()) {
              row--;
              Rectangle prevRect = table.getCellRect(row, col, true);
  
              rect.y = prevRect.y + prevRect.height;
          }
  
          if (rect.y == 0) {
              rect.y = -1;
          } else {
              rect.y -= 2;
          }
  
          rect.height = 3;
  
          return rect;
      }
docs: Get the horizontal drop line rectangle.
  
  @param  loc the drop location.
  
  @return the rectangle.