Akshay Raut Akshay Raut - 4 months ago 34
Java Question

Font Awesome with Swing

Is it possible to use Font Awesome with swing applications?
If possible then how to use its icons with swing components (JButton or JLabel).
I've used Font Awesome earlier with my Primefaces application.

Answer

Try jIconFont (Swing or JavaFX) at http://jiconfont.github.io/

Example:

Icon icon = IconFontSwing.buildIcon(FontAwesome.SMILE_O, 40, new Color(0, 150, 0));

JLabel label = new JLabel(icon);