Every time I try to launch this it gives me 'location is required' in the Eclipse console relating to line 17, the one containing the FXMLLoader.
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
StackPane page = new StackPane();
page = FXMLLoader.load(Main.class.getResource("Sample.fxml"));
Scene scene = new Scene(page);
primaryStage.setScene(scene);
primaryStage.setTitle("First JavaFX programme.");
primaryStage.show();
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
public static void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
}
}