void (MouseEvent e) { if (!canResizeCells()) { return; } Point pnt = SwingUtilities.convertPoint(GridCaptionPanel.this, e.getPoint(), mySelectedContainer.getDelegee()); int gridLine = mySelectedContainer.getGridLayoutManager().getGridLineNear(mySelectedContainer, myIsRow, pnt, 4); // first grid line may not be dragged if (gridLine <= 0) { setCursor(Cursor.getDefaultCursor()); } else if (myIsRow) { setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)); } else { setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR)); } }