Help me lord

This commit is contained in:
sageTheDM 2025-01-12 22:21:00 +01:00
parent d6db08b61f
commit a417374d81
2 changed files with 3 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import javafx.scene.Scene;
import javafx.stage.Stage; import javafx.stage.Stage;
import java.io.IOException; import java.io.IOException;
import java.util.Objects;
/** /**
* JavaFX App * JavaFX App
@ -21,7 +22,8 @@ public class App extends Application {
scene = new Scene(loadFXML("shop")); scene = new Scene(loadFXML("shop"));
// Apply the CSS stylesheet // 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 // Set the stage properties
stage.setScene(scene); stage.setScene(scene);
@ -42,5 +44,4 @@ public class App extends Application {
public static void main(String[] args) { public static void main(String[] args) {
launch(); launch();
} }
} }