if (header.getReorderingAllowed()) { TableColumnModel model = header.getColumnModel(); int n = model.getColumnCount(); if (n < 2)  return;  boolean onBoundary = false;  int x = e.getX(); int p = 0; int col = - 1;  Scan: for (int i = 0; i < n; i++) { p += model.getColumn(i).getWidth(); if (p > x) { col = i; break Scan; } } if (col < 0) return;  TableColumn dragIt = model.getColumn(col); header.setDraggedColumn(dragIt);  draggingFrom = (p - dragIt.getWidth()) - x; draggingHeaderRect = new Rectangle(header.getHeaderRect(col)); draggingColumnNumber = col; } }
    public void mousePressed(MouseEvent e)    {      // TODO: Implement this properly.    }