JFoenix icon indicating copy to clipboard operation
JFoenix copied to clipboard

jfoenix-components.css not found in JFoenix 1.10.0

Open Olmectron opened this issue 9 years ago • 1 comments

Hi.

I'm trying to run the Animation demo, but I get a NullPointerException:

Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at com.olmectron.costeno.Start.start(Start.java:111) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) ... 1 more

Start.java:111 line is this one:

final Scene scene = new Scene(wizard, 800, 200); final ObservableList stylesheets = scene.getStylesheets(); stylesheets.addAll(Start.class.getResource("/css/jfoenix-design.css").toExternalForm(), Start.class.getResource("/css/jfoenix-components.css").toExternalForm()); stage.setTitle("JFX Button Demo"); stage.setScene(scene); stage.show();

I got the JAR directly, and then got it from adding it to pom.xml in a Maven project, but jfoenix-components.css is never there. Only jfoenix-design.css and jfoenix-fonts.css are seen in the css directory.

Also, running the Button demo throws this same Exception because of not finding jfoenix-components.css. If I replace it with jfoenix-design.css, the ripple animation in buttons work, but the raised-button looks the same as the flat one (no background).

Where do I get this CSS file that many of the demos use?

Olmectron avatar Nov 09 '17 17:11 Olmectron

Hello, the file "jfoenix-componenets.css" is part of the demo, not jfoenix jar. you need to fetch jfoenix github repo to get the demo project.

Regards,

jfoenixadmin avatar Nov 10 '17 06:11 jfoenixadmin