boolean (InputEvent event) { if (event instanceof MouseEvent mouseEvent) { var insets = getInsets(); if (insets == null) { return false; } return mouseEvent.getX() < insets.left || mouseEvent.getY() < insets.top; } return false; }