Making a music program
This commit is contained in:
@@ -3,6 +3,7 @@ package sbu.javafx;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -16,7 +17,9 @@ public class MusicApp extends Application {
|
||||
Scene scene = new Scene(fxmlLoader.load());
|
||||
stage.setTitle("Music Player");
|
||||
stage.setScene(scene);
|
||||
//TODO: add icon to the stage
|
||||
stage.setWidth(900);
|
||||
stage.setHeight(500);
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("icon.png")));
|
||||
stage.show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user