@Override public void mousePressed(MouseEvent e) { if (e.getSource() != table) return; int row = table.rowAtPoint(e.getPoint()); if (row >= 0) { // init drag GeoElement geo = ((ConstructionTableData) data).getGeoElement(row); dragIndex = geo.getConstructionIndex(); minIndex = geo.getMinConstructionIndex(); maxIndex = geo.getMaxConstructionIndex(); } }