0

I have used a jfoenix.jar file to add the Jfoenix elements to my Scenebuilder, then I went into Intelij and added this to the pom.xml:

<!-- https://mvnrepository.com/artifact/com.jfoenix/jfoenix -->
<dependency>
  <groupId>com.jfoenix</groupId>
  <artifactId>jfoenix</artifactId>
  <version>9.0.1</version>
</dependency>

my entire pom.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.example</groupId>
  <artifactId>Start</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>Start</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>5.9.1</junit.version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.openjfx</groupId>
      <artifactId>javafx-controls</artifactId>
      <version>18.0.2</version>
    </dependency>
    <dependency>
      <groupId>org.openjfx</groupId>
      <artifactId>javafx-fxml</artifactId>
      <version>18.0.2</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.jfoenix/jfoenix -->
    <dependency>
      <groupId>com.jfoenix</groupId>
      <artifactId>jfoenix</artifactId>
      <version>9.0.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
        <configuration>
          <source>18</source>
          <target>18</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-maven-plugin</artifactId>
        <version>0.0.8</version>
        <executions>
          <execution>
            <!-- Default configuration for running with: mvn clean javafx:run -->
            <id>default-cli</id>
            <configuration>
              <mainClass>com.example.start/com.example.start.HelloApplication</mainClass>
              <launcher>app</launcher>
              <jlinkZipName>app</jlinkZipName>
              <jlinkImageName>app</jlinkImageName>
              <noManPages>true</noManPages>
              <stripDebug>true</stripDebug>
              <noHeaderFiles>true</noHeaderFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

My problem, now when I insert something from jfoenix in the FXML file with scneebuilder, you don't see that when I run the FXMl file in the java project, only see the javafx elements?

I don´t now what i have to do?

My modulinfo looks so:

module com.example.start {
  requires javafx.controls;
  requires javafx.fxml;

  opens com.example.start to javafx.fxml;
  exports com.example.start;
}

I don´t know really what I have to do?`Hab

  • 2
    Use [MaterialFX instead](https://github.com/palexdev/MaterialFX), see [how to use it](https://stackoverflow.com/questions/71931192/using-materialfx-in-intellij/71931282#71931282). – jewelsea Feb 28 '23 at 13:28
  • Probably you can require the correct module to use jfoenix (I don't know what that is), or delete your module-info and add the JavaFX modules manually, but I recommend changing to MaterialFX regardless, because of [things like this](https://stackoverflow.com/questions/70082473/working-with-javafx-in-maven-jfoenix-9-0-10-dependency-issue/70086754#70086754). – jewelsea Feb 28 '23 at 13:31
  • I am not allowed to use MaterialFx – markusnether Feb 28 '23 at 15:17

0 Answers0