Importing JFoenix library to SceneBuilder - javaFX

落爺英雄遲暮 提交于 2019-12-03 02:58:29

Many JavaFX custom controls are no longer compatible between Java 8 and 9 versions due mainly to the changes in the JavaFX API (if they were using private skins).

This can be noticed with Scene Builder, which is a JavaFX application after all running either Java 8 or 9.

If you want to add custom libraries like JFoenix to Scene Builder you have to choose the right library for the right version:

  • JFoenix 8.0.2 works fine for Scene Builder 8.4.1
  • JFoenix 9.0.1 works fine for Scene Builder 9.0.1

JavaFX 8

Scene Builder 8.4.1, JAR/FXML Manager -> Manually add Library from Repository, and search for com.jfoenix, jfoenix, selecting the latest 8 version (8.0.2):

then click Add Jar, you'll see 44 components:

JavaFX 9

Scene Builder 9.0.1, JAR/FXML Manager -> Search repositories for jfoenix and select com.jfoenix:jfoenix as this will pick the latest version available:

Then click Add Jar, it will add 44 components again.

Mixing versions

But if using Scene Builder 9.0.1 you select 8.0.2 (manually add Library from Repository, and search for com.jfoenix, jfoenix, selecting the version, 8.0.2), you will get only 23 components:

These components seem compatible between Java 8 and 9, while the 21 missing are no longer compatible.

At the end, it will depend on your real project. If you are targeting JDK 8, I'd suggest you stick to Scene Builder 8.4.1, so you can use the same library versions as in your project.

Simple Check scene builder version if its 9 then uninstall and install scene builder 8.x.x for netbeans version 8.x.x

if you have netbeans 11 then use scene builder version 11

i wasted enough time on this hope you don't and this helps. Have a good day ! :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!