protected @Nullable Point updateLocation() {
    PointerInfo pointerInfo = MouseInfo.getPointerInfo();
    if (pointerInfo == null) return null;

    Point mouseLocation = pointerInfo.getLocation();
    Dialog pickerDialog = getPickerDialog();
    if (pickerDialog != null && mouseLocation != null) {
      pickerDialog.setLocation(mouseLocation.x - pickerDialog.getWidth() / 2, mouseLocation.y - pickerDialog.getHeight() / 2);
    }
    return mouseLocation;
  }
protected @Nullable Point updateLocation()