将JFoenix库导入SceneBuilder - javaFX [英] Importing JFoenix library to SceneBuilder - javaFX

查看:1896
本文介绍了将JFoenix库导入SceneBuilder - javaFX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Java 8的官方网站下载了库JFoenix.jar。

I downloaded library JFoenix.jar from official site for Java 8.

我想将该库导入Scene Builder(Gluon)。但是每当我尝试导入它时,我都没有来自该库的所有元素
它错过了例如JFXButton,JFXTextarea等)

I want to import that library to Scene Builder (Gluon). But everytime I try to import it, I dont have all elements from that library (it misses for example JFXButton, JFXTextarea etc.).

我只能导入该库中的21个元素,我不知道我做错了什么。有人可以提供帮助吗?

I can import only 21 elements from that library, and I dont know what I am doing wrong. Anyone can help?

屏幕截图:

导入库

仅导入21个元素:

only imports 21 elements:

推荐答案

许多JavaFX自定义控件在Java 8和9版本之间不再兼容,主要是因为JavaFX API中的更改(如果它们使用私有皮肤)。

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).

这可以是注意到Scene Builder,它是一个JavaFX应用程序,在运行Java 8或9之后。

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

如果你想将像JFoenix这样的自定义库添加到Scene Builder中你必须选择正确版本的正确库:

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适用于Scene Builder 8.4.1

  • JFoenix 9.0.1适用于Scene Builder 9.0.1

JavaFX 8

场景Builder 8.4.1,JAR / FXML Manager - >从Repository手动添加Library,并搜索 com.jfoenix jfoenix ,选择最新的8版本(8.0.2):

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):

然后点击添加Jar,你会看到44个组件:

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

JavaFX 9

Scene Builder 9.0.1,JAR / FXML管理器 - >搜索 jfoenix 的存储库并选择 com.jfoenix:jfoenix ,因为这将选择最新版本:

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:

然后点击添加Jar,它将再次添加44个组件。

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

混合版本

但如果使用Scene Builder 9.0.1,则选择8.0.2(手动广告d来自Repository的库,并搜索 com.jfoenix jfoenix ,选择版本8.0.2),你将只获得23个组件:

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:

这些组件似乎在Java 8和9之间兼容,而21个缺失不再兼容。

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

最后,它将取决于您的真实项目。如果您的目标是JDK 8,我建议您坚持使用Scene Builder 8.4.1,这样您就可以使用与项目中相同的库版本。

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.

这篇关于将JFoenix库导入SceneBuilder - javaFX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆