JFoenix 9.0.0: Unable to load CSS-File directly
See original GitHub issueI just created a simple Application using Java 9.0.1:
/**
* @author w.glanzer, 20.12.2017.
*/
public class TestApplication extends Application
{
@Override
public void start(Stage primaryStage)
{
Scene scene = new Scene(new BorderPane());
// TestApplication.class.getResource("/css/jfoenix-design.css") => NULL
// ModuleLayer.boot().findModule("com.jfoenix").get().getResourceAsStream("/css/jfoenix-design.css"); => NULL
String jfoenixCSSPath = TestApplication.class.getResource("/css/jfoenix-design.css").toExternalForm();
scene.getStylesheets().add(jfoenixCSSPath);
primaryStage.setScene(scene);
primaryStage.show();
}
}
How to load the provided “jfoenix-design.css” correctly? All ways I try returning null. Is it obsolete to add the provided css to my scene?
EDIT: I used the new deployed 9.0.0 from MavenCentral.
My module-info:
module com.github.wglanzer.test {
requires javafx.base;
requires javafx.graphics;
requires com.jfoenix;
exports com.github.wglanzer.test;
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
JFoenix 9.0.0: Unable to load CSS-File directly #546 - GitHub
I just created a simple Application using Java 9.0.1: /** * @author w.glanzer, 20.12.2017. */ public class TestApplication extends ...
Read more >javaFX program not working after changing the scene builder ...
This error: Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/parser/CSSParser at de.jensd.fx.glyphs.GlyphIcon.
Read more >Index (jfoenix 9.0.0 API) - Javadoc.io
Converts the CSS for -fx-button-type items into ButtonType. buttonTypeProperty() - Method in class com.jfoenix.controls.JFXButton. C. cache ...
Read more >Correct Setup for Developing In Javafx with Jfoenix 9.0.9 - ADocLib
Here we lay out a series of steps for you to follow that will help facilitate the migration of any Maven build to...
Read more >JFoenix - Bountysource
When I'm trying to import com.sun.javafx.css. ... IllegalAccessError: superclass access check failed: class com.jfoenix.controls.behavior.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
not sure yet about the change, however the artifact 9.0.0 is still useful. “jfoenix-deisgn.css” is not used in jfoenix core, it’s just an additional css so you can use material design color naming in your project. You can copy the file and add it to your project manually.
we refactored the css files in the latest version of JFoenix, 9.0.6, however not sure if this solved the issue (didn’t test it)