diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/App.java b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/App.java index 3eb8916..6e132cf 100644 --- a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/App.java +++ b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/src/main/java/com/example/App.java @@ -7,6 +7,7 @@ import javafx.scene.Scene; import javafx.stage.Stage; import java.io.IOException; +import java.util.Objects; /** * JavaFX App @@ -21,7 +22,8 @@ public class App extends Application { scene = new Scene(loadFXML("shop")); // Apply the CSS stylesheet - scene.getStylesheets().add(getClass().getResource("styles.css").toExternalForm()); + String cssPath = Objects.requireNonNull(getClass().getResource("styles.css")).toExternalForm(); + scene.getStylesheets().add(cssPath); // Set the stage properties stage.setScene(scene); @@ -42,5 +44,4 @@ public class App extends Application { public static void main(String[] args) { launch(); } - } diff --git a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/App.class b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/App.class index 9817c5c..e8fc1c8 100644 Binary files a/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/App.class and b/Code/ost/JAVA-FX-PROJECT/_javafx_website_task/target/classes/com/example/App.class differ