如何将jfoenix添加到Intellij
我已经尝试了很多时间将JFOENIX添加到Intellij,但我没有成功。我看到了许多YouTube视频,并阅读了来自各个网站的帖子,但所有网站都没有起作用。
我在我的场景构建器版本8.0.5中定期使用JFOENIX,但是当我尝试在Intellij中激活它时,它根本不起作用。这是我的XML代码:
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXPasswordField?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.effect.Bloom?>
<?import javafx.scene.effect.InnerShadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="576.0" prefWidth="1050.0" style="-fx-background-color: #20120F;" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.SignInController">
<children>
<AnchorPane layoutX="639.0" layoutY="88.0" prefHeight="400.0" prefWidth="350.0" style="-fx-background-color: #9C2B27;">
<children>
<JFXTextField focusColor="#d4af37" layoutX="50.0" layoutY="135.0" prefWidth="250.0" promptText="Username / E-mail" unFocusColor="#c3b7b7" />
<JFXPasswordField focusColor="#d4af37" layoutX="50.0" layoutY="222.0" prefWidth="250.0" promptText="Password" unFocusColor="#c3b7b7" />
<JFXButton layoutX="50.0" layoutY="312.0" prefWidth="250.0" style="-fx-background-color: #E45652;" text="Sign In" textFill="#dad6d6">
<effect>
<Bloom threshold="0.0" />
</effect>
<font>
<Font name="System Bold" size="12.0" />
</font>
</JFXButton>
<Label layoutX="122.0" layoutY="52.0" text="Sign In" textFill="WHITE">
<font>
<Font name="Cambria" size="36.0" />
</font>
<effect>
<InnerShadow />
</effect>
</Label>
</children>
</AnchorPane>
<ImageView fitHeight="576.0" fitWidth="576.0" opacity="0.2" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../Image/TG_Background.jpg" />
</image>
</ImageView>
<Label layoutX="55.0" layoutY="131.0" text="Don't Have An Account? No Problem Sign Up Now And Enjoy Our Variety Of Features" textAlignment="CENTER" textFill="WHITE">
<font>
<Font name="Cambria" size="30.0" />
</font>
<effect>
<Bloom threshold="0.0" />
</effect>
</Label>
<JFXButton layoutX="212.0" layoutY="266.0" prefHeight="44.0" prefWidth="153.0" style="-fx-background-color: #E45652;" text="Sign Up" textFill="#dad6d6">
<effect>
<Bloom threshold="0.0" />
</effect>
<font>
<Font name="System Bold" size="18.0" />
</font>
</JFXButton>
</children>
</AnchorPane>
另外,我尝试使用JAR或MAVEN依赖项导入JFOENIX,而当我这样做时,JFOENIX库会被Intellij识别,但仍然无法运行:
帮助我会感谢。
I've tried a lot to add jFoenix to IntelliJ but I didn't succeed to do so. I saw many youtube videos and read posts from various websites but all didn't work.
I'm using jFoenix regularly in my Scene Builder version 8.0.5 but still when I try to activate it in IntelliJ it doesn't work at all. Here is my XML code:
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXPasswordField?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.effect.Bloom?>
<?import javafx.scene.effect.InnerShadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="576.0" prefWidth="1050.0" style="-fx-background-color: #20120F;" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.SignInController">
<children>
<AnchorPane layoutX="639.0" layoutY="88.0" prefHeight="400.0" prefWidth="350.0" style="-fx-background-color: #9C2B27;">
<children>
<JFXTextField focusColor="#d4af37" layoutX="50.0" layoutY="135.0" prefWidth="250.0" promptText="Username / E-mail" unFocusColor="#c3b7b7" />
<JFXPasswordField focusColor="#d4af37" layoutX="50.0" layoutY="222.0" prefWidth="250.0" promptText="Password" unFocusColor="#c3b7b7" />
<JFXButton layoutX="50.0" layoutY="312.0" prefWidth="250.0" style="-fx-background-color: #E45652;" text="Sign In" textFill="#dad6d6">
<effect>
<Bloom threshold="0.0" />
</effect>
<font>
<Font name="System Bold" size="12.0" />
</font>
</JFXButton>
<Label layoutX="122.0" layoutY="52.0" text="Sign In" textFill="WHITE">
<font>
<Font name="Cambria" size="36.0" />
</font>
<effect>
<InnerShadow />
</effect>
</Label>
</children>
</AnchorPane>
<ImageView fitHeight="576.0" fitWidth="576.0" opacity="0.2" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../Image/TG_Background.jpg" />
</image>
</ImageView>
<Label layoutX="55.0" layoutY="131.0" text="Don't Have An Account? No Problem
Sign Up Now And Enjoy Our
Variety Of Features" textAlignment="CENTER" textFill="WHITE">
<font>
<Font name="Cambria" size="30.0" />
</font>
<effect>
<Bloom threshold="0.0" />
</effect>
</Label>
<JFXButton layoutX="212.0" layoutY="266.0" prefHeight="44.0" prefWidth="153.0" style="-fx-background-color: #E45652;" text="Sign Up" textFill="#dad6d6">
<effect>
<Bloom threshold="0.0" />
</effect>
<font>
<Font name="System Bold" size="18.0" />
</font>
</JFXButton>
</children>
</AnchorPane>
Also, I tried to import the jFoenix using the JAR or a Maven dependency and when I do so the jFoenix library becomes recognized by IntelliJ but still can't run:
If anyone could help I'll be thankful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

使用
mavan
创建您的项目然后添加
jfoenix
依赖项
inpom.xml
file喜欢这里:
在此
pom.xml
文件中添加com.jfoenix
,org.openjfx
和junit
依赖项
create your project using
Mavan
and then add
jfoenix
dependency
inpom.xml
filelike here:
in this
pom.xml
file addcom.jfoenix
,org.openjfx
andjunit
dependency