mirror of
https://gitlab.com/kauron/jstudy
synced 2024-11-13 07:33:44 +01:00
Set icon
This commit is contained in:
parent
a243a6f4b7
commit
55c662291d
2 changed files with 3 additions and 3 deletions
|
@ -5,6 +5,7 @@ import javafx.application.Application;
|
|||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class Main extends Application {
|
||||
|
@ -14,11 +15,10 @@ public class Main extends Application {
|
|||
AppConfig.load();
|
||||
Parent root = FXMLLoader.load(Main.class.getResource("view/main.fxml"));
|
||||
primaryStage.setTitle("JStudy");
|
||||
primaryStage.getIcons().add(new Image(Main.class.getResourceAsStream("img/icon.png")));
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
primaryStage.setOnCloseRequest(event -> {
|
||||
AppConfig.save();
|
||||
});
|
||||
primaryStage.setOnCloseRequest(event -> AppConfig.save());
|
||||
}
|
||||
|
||||
|
||||
|
|
BIN
src/main/resources/es/kauron/jstudy/img/icon.png
Normal file
BIN
src/main/resources/es/kauron/jstudy/img/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in a new issue