package sbu.javafx; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception { FXMLLoader loader = new FXMLLoader(getClass().getResource("/sbu/javafx/App-view.fxml")); Parent root = loader.load(); MusicController controller = loader.getController(); controller.musicsListView.getItems().addAll( new Song("Blinding Lights", "The Weeknd"), new Song("Flowers", "Miley Cyrus"), new Song("As It Was", "Harry Styles"), new Song("Comme des enfants", "Coert De Pirate"), new Song("Slow Down", "GRAE"), new Song("Cigarettes out the window", "TV Girl"), new Song("Shape of My Heart", "Sting"), new Song("deja vu", "Olivia Rodirgo"), new Song("Do It To It", "Acraze"), new Song("Bones", "Imagine Dragons"), new Song("Bunker", "Balthazar") ); controller.setupListView(controller.musicsListView); Scene scene = new Scene(root, 500, 600); scene.getStylesheets().add( getClass().getResource("/css/light.css").toExternalForm() ); primaryStage.setTitle("Music Player"); primaryStage.setScene(scene); primaryStage.setResizable(false); primaryStage.show(); } public static void main(String[] args) { launch(args); } }