Skip to content

Commit

Permalink
Feat: Added our icon as icon on taskbar and others?
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 13, 2026
1 parent 44206c0 commit 55644ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import static javafx.application.Application.launch;

import java.net.http.HttpClient;
import java.util.Objects;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import ntnu.systemutvikling.team6.database.DatabaseManager;
import ntnu.systemutvikling.team6.models.Charity;
Expand All @@ -18,6 +21,8 @@ public void start(Stage stage) throws Exception {
FXMLLoader fxmlLoader =
new FXMLLoader(HmHApplication.class.getResource("/fxml/frontPage.fxml"));
Scene scene = new Scene(fxmlLoader.load());
Image icon = new Image(Objects.requireNonNull(HmHApplication.class.getResource("/images/Logo.png")).openStream());
stage.getIcons().add(icon);
stage.setTitle("Help Me Help");
stage.setScene(scene);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import ntnu.systemutvikling.team6.HmHApplication;
import ntnu.systemutvikling.team6.models.Charity;

import java.io.IOException;
import java.util.Objects;

public class LoaderScene {
public static void LoadScene(String sceneName, ActionEvent event, Charity charity){
Expand All @@ -30,6 +32,8 @@ public static void LoadScene(String sceneName, ActionEvent event, Charity charit
}

Stage stage = (Stage) ((Node)event.getSource()).getScene().getWindow();
Image icon = new Image(Objects.requireNonNull(HmHApplication.class.getResource("/images/Logo.png")).openStream());
stage.getIcons().add(icon);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setFullScreen(true);
Expand Down

0 comments on commit 55644ad

Please sign in to comment.