void (@NotNull Component component, @Nullable Component newParent) { if (newParent instanceof Accessible) { component.getAccessibleContext().setAccessibleParent((Accessible)newParent); return; } component.getAccessibleContext().setAccessibleParent(null); }