---mainclass-- package javafxtemplate1; //FXML_JDBC_Combo1 import java.sql.SQLException; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.event.EventHandler; import java.io.IOException; import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; public class JavaFXTemplate1 extends Application { @Override public void start(Stage primaryStage) throws IOException, SQLException { FXMLLoader loader =new FXMLLoader(getClass().getResource("JavaFXMLDoc1.fxml")); //Parent root =FXMLLoader.load(getClass().getResource("JavaFXMLDoc1.fxml")); Parent root = loader.load(); JavaFXMLDoc1Controller localcontroller = loader.getController(); //Group root = new Group(); Scene scene = new Scene(root, 450,300); primaryStage.setScene(scene); primaryStage.setTitle("FXML AnchorPane::List , ListView::Label, Button"); primaryStage.show(); localcontroller.loadCombo(); } public static void main(String[] args) { launch(args); } } class DemoEventHandler1 implements EventHandler{ @Override public void handle(ActionEvent event) { Platform.exit(); } } -----JavaFXMLDoc1.xml-----