0

I'm trying to create some GUI with Jfoenix and I'm getting following errors when i run them. I'm not understanding the errors and i have spent the whole day please guide me.

<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXPasswordField?>
<?import com.jfoenix.controls.JFXTextField?>
<?import javafx.scene.layout.AnchorPane?>

<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="700.0" style="-fx-background-color: #20120F;" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client_side.FXMLDocumentController">
<children>
  <AnchorPane layoutX="380.0" layoutY="34.0" prefHeight="333.0" prefWidth="306.0" style="-fx-background-color: #9c2827;">
     <children>
        <JFXTextField focusColor="#3cc656" layoutX="79.0" layoutY="93.0" promptText="Email" style="-fx-prompt-text-fill: #c3b7b7;" unFocusColor="#c3b7b7" />
        <JFXPasswordField focusColor="#3cc656" layoutX="86.0" layoutY="181.0" promptText="Password" style="-fx-prompt-text-fill: #c3b7b7;" unFocusColor="#c3b7b7" />
     </children>
  </AnchorPane>
</children>

and errors

https://pastebin.com/hwb0K304

Nouman Arshad
  • 101
  • 1
  • 2
  • 10

2 Answers2

0

This usually occurs when you use the wrong jdk and jfoenix combination (eg : using jdk8 with jfoenix 9 or jdk9 with jfoenix) To prevent this, if you are using jdk 8, please use the jfoenix library , or jdk 9 with jfoenix for java 9 from here :

Download JFoenix

It will most likely fix your error

Oshan Mendis
  • 186
  • 1
  • 8
  • I would guess its the other way. OP is using JFoenix with Java 9 version and trying to compile it with 1.8 on his end. – Naman Nov 03 '17 at 18:45
  • Yes that's what I said its either jdk8 with jfoenix 9 or jdk9 with jfoenix 8 but yes, more logical thing is that he's using jfoenix 9 with jdk 8 – Oshan Mendis Nov 04 '17 at 05:40
0

Perform these steps in order:

1) Remove the current JFoenix lib jar from SceneBuilder and from Eclipse/ InteliJ / NetBeans.

2) Download JFoenix for Java 8 and add it to SceneBuilder and your IDE. You can download the JFoenix Java 8 file from here: JFoenix Java 8 JAR file

Robert Columbia
  • 6,313
  • 15
  • 32
  • 40