header.setCursor(Cursor.getDefaultCursor());
header.setCursor(originalCursor);
    public void mouseMoved(MouseEvent e)    {      // When dragging, the functionality is handled by the mouseDragged.      if (e.getButton() == 0 && header.getResizingAllowed())        {          TableColumnModel model = header.getColumnModel();          int n = model.getColumnCount();          if (n < 2)            // It must be at least two columns to have at least one boundary.            // Otherwise, nothing to do.            return;          boolean onBoundary = false;          int x = e.getX();          int a = x - COLUMN_BOUNDARY_TOLERANCE;          int b = x + COLUMN_BOUNDARY_TOLERANCE;          int p = 0;          Scan: for (int i = 0; i < n - 1; i++)            {              p += model.getColumn(i).getWidth();              if (p >= a && p <= b)                {                  TableColumn column = model.getColumn(i);                  onBoundary = true;                  draggingFrom = x;                  prevPrefWidth = column.getWidth();                  header.setResizingColumn(column);                  break Scan;                }    }          if (onBoundary != showingResizeCursor)            {              // Change the cursor shape, if needed.              if (onBoundary)                {                  if (p < x)                    header.setCursor(Cursor.getPredefinedCursor                                     (Cursor.W_RESIZE_CURSOR));                  else                    header.setCursor(Cursor.getPredefinedCursor                                     (Cursor.E_RESIZE_CURSOR));                }              else                {                  header.setCursor(Cursor.getDefaultCursor());                  header.setResizingColumn(null);                }              showingResizeCursor = onBoundary;            }        }    }