forked from AdvancedProgramming1404/HW-07-JavaFX
tamrin 7
This commit is contained in:
@@ -3,6 +3,8 @@ package sbu.javafx;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -13,10 +15,14 @@ public class MusicApp extends Application {
|
||||
public void start(Stage stage) throws IOException
|
||||
{
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(MusicApp.class.getResource("App-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load());
|
||||
Scene scene = new Scene(fxmlLoader.load(),600,350);
|
||||
stage.setTitle("Music Player");
|
||||
stage.setScene(scene);
|
||||
//TODO: add icon to the stage
|
||||
Image icon = new Image(getClass().getResource("dextericon.png").toExternalForm());
|
||||
stage.getIcons().add(icon);
|
||||
stage.setTitle("Dexter Music Player");
|
||||
stage.setScene(scene);
|
||||
|
||||
stage.show();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user