@Override
public void mouseMoved(MouseEvent evt)
{
- if (od.isPositionInBox(evt.getX(), evt.getY()))
+ if (!draggingBox)
+ // don't bother changing the cursor if we're dragging the box
+ // as we can't have moved inside or out of the box in that case
{
- // display drag cursor at mouse position
- setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
- }
- else
- {
- // reset cursor
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ if (od.isPositionInBox(evt.getX(), evt.getY()))
+ {
+ // display drag cursor at mouse position
+ setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+ }
+ else
+ {
+ // reset cursor
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
}
}
});