package sbu.javafx;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import javax.swing.*;
import java.awt.*;
import javafx.scene.image.Image;
import java.io.IOException;

public class MusicApp extends Application {

    @Override
    public void start(Stage stage) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader(MusicApp.class.getResource("App-view.fxml"));
        Scene scene = new Scene(fxmlLoader.load(), 700, 700);
        scene.getStylesheets().add(getClass().getResource("dark.css").toExternalForm());
        stage.setTitle("Music Player");
        stage.setScene(scene);

        //TODO: add icon to the stage
        Image icon = new Image(getClass().getResourceAsStream("MusicAppIcon.png"));
        stage.getIcons().add(icon);

        stage.show();
    }

}
