void (@Nullable EditableArea area) { if (myArea != area) { setCursor(null); myArea = area; if (myArea != null) { Point mouseLocation = MouseInfo.getPointerInfo().getLocation(); SwingUtilities.convertPointFromScreen(mouseLocation, myArea.getNativeComponent()); myCurrentScreenX = mouseLocation.x; myCurrentScreenY = mouseLocation.y; } refreshCursor(); } }