void (Component component) { if (component != null && component.isShowing()) { if (AdvancedSettings.getInstanceIfCreated() != null && AdvancedSettings.getBoolean("ide.settings.move.mouse.on.default.button")) { Point point = component.getLocationOnScreen(); int dx = component.getWidth() / 2; int dy = component.getHeight() / 2; try { new Robot().mouseMove(point.x + dx, point.y + dy); component.requestFocusInWindow(); } catch (AWTException ignored) { // robot is not available } } } }