package test; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class FXMLTest extends Application { @Override public void start(Stage stage) throws Exception { stage.setTitle("FXML Test"); stage.setWidth(800); stage.setHeight(600); Parent root = FXMLLoader.load(getClass().getResource("fxml_test.fxml")); Scene scene = new Scene(root); scene.getStylesheets().add("test/fxml_test.css"); stage.setScene(scene); stage.show(); } public static void main(String[] args) { launch(args); } }