ServiceView (@Nullable Component contextComponent) { while (contextComponent != null && !(contextComponent instanceof ServiceView)) { contextComponent = contextComponent.getParent(); } return (ServiceView)contextComponent; }