JavaFX - MaterialDesignIcons / GluonHQ Icon not showing

1.6k Views Asked by At

One of my coworkers created a mock-up of a JavaFX GUI using Netbeans. I am now in charge of turning it into a first prototype of the app. I imported the generated Java and FXML files in my Eclipse, but when I try to run it it fails to display the button icons.

The icons are declared in the FXML file as follows:

<?import com.gluonhq.charm.glisten.control.Icon?>

<Icon content="FILE_DOWNLOAD" prefHeight="112.0" prefWidth="119.0" />

But the result when I run it is just an empty rectangles: https://i.stack.imgur.com/0ODfh.jpg

I tried to add a Maven dependency to MaterialDesignIcons (which apparently what Gluon uses to get the icons), but it didn't change anything. I also tried to run Maven in debug mode, but I don't see any warning or error related to this issue.

1

There are 1 best solutions below

0
trilogy On

Use FontAwesomeFX

They have a library for MaterialDesign and Material Icons as well...

https://bitbucket.org/Jerady/fontawesomefx

https://bintray.com/jerady/maven/FontAwesomeFX/view