So I am new to JavaFX and from all the tutorials I've watched and apps I've coded, the entire view is created in the FXML file.
I came across ControlsFX and Im trying to implement the popup feature in it. My question here is; How do I set all the components inside a component to load from an external FXML file?
This is what I tried myself but cant get it to work:
PopOver popOver = new PopOver();
popOver.setArrowLocation(PopOver.ArrowLocation.RIGHT_CENTER);
popOver.setContentNode(new Label("Test"));
popOver.setAutoFix(true);
popOver.setAutoHide(true);
popOver.setHideOnEscape(true);
popOver.setDetachable(false);
Node content = null;
FXMLLoader fxmlLoader = new FXMLLoader();
content = (Parent) fxmlLoader.load(getClass().getResourceAsStream("new.fxml"));
popOver.setContentNode(content);
popOver.show(new_button);