Search code examples
javaintellij-ideajavafxfxmlgluon

Adding Gluon UI library to a JavaFX Desktop application


I am working on a desktop application using JavaFX, FXMLs (using Scene Builder) and JDBC on IntelliJ IDEA Ultimate. I added Gluon library to the Scene Builder successfully but when I exported the FXML file to IntelliJ it did not recognize the Gluon components, the problem obviously is adding Gluon Library to IntelliJ which I couldn't do. Question is, How to add Gluon library to IntelliJ? I checked several forums and I didn't figure it out.


Solution

  • To use Gluon Mobile classes from the com.gluonhq.charm.glisten.control package, for example, Avatar and AutoCompleteTextField you have to include the Charm Glisten dependency from the Gluon Nexus repository:

    <dependencies>
      <dependency>
        <groupId>com.gluonhq</groupId>
        <artifactId>charm-glisten</artifactId>
        <version>6.0.2</version>
      </dependency>
    </dependencies>
    
    <repositories>
      <repository>
        <id>gluon-nexus-repository</id>
        <url>http://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
      </repository>
    </repositories>