diff --git a/src/main/java/name/nathanmcrae/numbersstation/Main.java b/src/main/java/name/nathanmcrae/numbersstation/Main.java index 7bc3e01..23fe7a3 100644 --- a/src/main/java/name/nathanmcrae/numbersstation/Main.java +++ b/src/main/java/name/nathanmcrae/numbersstation/Main.java @@ -25,6 +25,7 @@ import java.util.Optional; import javafx.application.Application; import javafx.application.Platform; import javafx.fxml.FXMLLoader; +import javafx.scene.image.Image; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; @@ -69,6 +70,7 @@ public class Main extends Application { controller.setNotification(startParams.notification().get()); primaryStage.setTitle("Numbers Station"); + primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png"))); primaryStage.setScene(new Scene(root)); primaryStage.show(); } else { @@ -86,6 +88,7 @@ public class Main extends Application { }); primaryStage.setTitle("Numbers Station"); + primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png"))); primaryStage.setScene(new Scene(root)); primaryStage.titleProperty().bindBidirectional(controller.windowTitle); primaryStage.show(); diff --git a/src/main/java/name/nathanmcrae/numbersstation/MainController.java b/src/main/java/name/nathanmcrae/numbersstation/MainController.java index cc75472..2b16529 100644 --- a/src/main/java/name/nathanmcrae/numbersstation/MainController.java +++ b/src/main/java/name/nathanmcrae/numbersstation/MainController.java @@ -28,6 +28,7 @@ import javafx.scene.control.ButtonType; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; +import javafx.scene.image.Image; import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyCode; import javafx.scene.Parent; @@ -84,6 +85,7 @@ public class MainController implements Initializable { settingsStage = new Stage(); settingsStage.initModality(Modality.APPLICATION_MODAL); settingsStage.setTitle("Numbers Station Settings"); + settingsStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png"))); settingsStage.setScene(new Scene(root)); settingsStage.show(); settingsStage.setOnHiding(event -> { @@ -111,6 +113,7 @@ public class MainController implements Initializable { selectStationStage.initModality(Modality.APPLICATION_MODAL); selectStationStage.setUserData(null); selectStationStage.setTitle("Numbers Station Selection"); + selectStationStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png"))); Scene scene = new Scene(root); scene.addEventFilter(KeyEvent.KEY_PRESSED, (e) -> controller.handleKeyPressed(e)); diff --git a/src/main/java/name/nathanmcrae/numbersstation/StationSettingsController.java b/src/main/java/name/nathanmcrae/numbersstation/StationSettingsController.java index a44c3e6..e261994 100644 --- a/src/main/java/name/nathanmcrae/numbersstation/StationSettingsController.java +++ b/src/main/java/name/nathanmcrae/numbersstation/StationSettingsController.java @@ -47,6 +47,7 @@ import javafx.scene.control.SpinnerValueFactory; import javafx.scene.control.TextField; import javafx.scene.control.TextInputDialog; import javafx.scene.control.ToggleGroup; +import javafx.scene.image.Image; import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyCode; import javafx.scene.Node; @@ -366,6 +367,7 @@ public class StationSettingsController { Stage stage = new Stage(); stage.setTitle("New prefix"); + stage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png"))); stage.setScene(new Scene(root)); stage.initModality(Modality.APPLICATION_MODAL); stage.showAndWait(); diff --git a/src/main/resources/icon.png b/src/main/resources/icon.png new file mode 100644 index 0000000..9f25cdb Binary files /dev/null and b/src/main/resources/icon.png differ