File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/example Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ public class Main extends Application {
14
14
public void start (Stage stage ) throws Exception {
15
15
16
16
if (!(Util .isWindows () || Util .isMac ())) { //Load Arial font for all *nix platforms
17
- Font .loadFont (getClass ().getResource ( Util . FILE_SEPARATOR + "Arial.ttf" ).toExternalForm (), 12 );
17
+ Font .loadFont (getClass ().getClassLoader (). getResource ( "Arial.ttf" ).toExternalForm (), 12 );
18
18
}
19
19
20
20
RootView rootView = new RootView ();
21
21
Pane root = rootView .getView ();
22
22
Scene scene = new Scene (root , Util .APP_WIDTH , Util .APP_HEIGHT );
23
- scene .getStylesheets ().add (getClass ().getResource ( Util . FILE_SEPARATOR + "app.css" ).toExternalForm ());
23
+ scene .getStylesheets ().add (getClass ().getClassLoader (). getResource ( "app.css" ).toExternalForm ());
24
24
stage .setTitle (Util .TITLE );
25
25
stage .setScene (scene );
26
26
stage .show ();
You can’t perform that action at this time.
0 commit comments