I'm already able to create and show a new window that uses the itemPopup.fxml file. My PrimaryStage uses the mainWindow.fxml file.
But my problem is that when I run the code to display the itemPopup window an error occurs when trying to change the itemLabel that is located in the itemPopop.fxml file. I have no problem changing labels from the mainWindow.fwml file.
@FXML
Label itemLabel
public void showItemPopup() throws Exception {
FXMLLoader fxmlLoader = new
FXMLLoader(getClass().getResource("itemPopup.fxml"));
Parent root1 = fxmlLoader.load();
Stage stage = new Stage();
stage.initStyle(StageStyle.UNDECORATED);
stage.setScene(new Scene(root1));
stage.show();
itemLabel.setText("TEST");
}