Package of latest Font Awesome fonts created for using with jIconFont.
jIconFont – Font Awesome is Java library, which expands the possibilities of the original library (jIconFont - Font Awesome by Carlos Eduardo Leite de Andrade) and uses latest versions of Font Awesome, and which can be used in Java Swing or JavaFX.
It aims to always be up to date with the latest version of Font Awesome.
For each Font Awesome icon style is there one class. There are three classes:
FontAwesomeSolid
– for these iconsFontAwesomeRegular
– for these iconsFontAwesomeBrands
– for these iconsYou can download this library from GitHub repository releases, Maven Central repository, or you can use it as Maven dependency:
<dependency>
<groupId>com.github.pervoj</groupId>
<artifactId>jiconfont-font-awesome</artifactId>
<version>1.0.2</version>
</dependency>
Each usage requires the jIconFont library.
If you are using this library as Maven dependency, this requirement will be attached automatically.
Using in Swing requires jIconFont - Swing dependency.
How it use? It’s simple. Here is example with solid style:
IconFontSwing.register(FontAwesomeSolid.getIconFont());
Icon icon = IconFontSwing.buildIcon(FontAwesomeSolid.CHECK, 40, new Color(0, 150, 0));
JLabel label = new JLabel(icon);
Using in JavaFX requires jIconFont - JavaFX dependency.
JavaFX usage is simple too:
IconFontFX.register(FontAwesomeSolid.getIconFont());
IconNode iconNode = new IconNode(FontAwesomeSolid.CHECK);
iconNode.setIconSize(40);
iconNode.setFill(Color.DARKGREEN);
FontAwesomeSolid
, FontAwesomeRegular
or FontAwesomeBrands
.FontAwesomeSolid.ICON_ID
(all in upper case and replace dashes with underscores).