Im having an issue with making a popup menu work in my code, The way i have it set up, is if a button is clicked, it will open up a new scene(which prompts up if they would like to delete something)
however that new scene is another FXML file with it's own controller, and when I tried to make the new FXML controller delete something, it wouldn't work because the code isn't in the same controller, so i can't execute the code from the FIRST controller.
Now I just want to be able to open up a dialogue within the same class, and I don't know how to convert the code for it to be in the same controller. this is the FXML code that I want to keep in the same controller
<AnchorPane id="AnchorPane" prefHeight="89.0" prefWidth="388.0"
xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"
fx:controller="finalprojectjava.DeletePopupController">
<children>
<Label layoutX="48.0" layoutY="14.0" prefHeight="32.0" prefWidth="293.0" text="Are you sure you want to delete contact?">
<font>
<Font size="16.0" />
</font>
</Label>
<Button layoutX="92.0" layoutY="50.0" mnemonicParsing="false" onAction="#acceptButton" prefHeight="25.0" prefWidth="91.0" text="Yes" />
<Button layoutX="195.0" layoutY="50.0" mnemonicParsing="false" onAction="#declineButton" prefHeight="25.0" prefWidth="91.0" text="No" />
</children>
</AnchorPane>