Swing 字体真棒 [英] Font Awesome with Swing

查看:29
本文介绍了Swing 字体真棒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 Font Awesome 与 Swing 应用程序一起使用?如果可能,那么如何将其图标与摆动组件(JButton 或 JLabel)一起使用.我之前在 Primefaces 应用程序中使用过 Font Awesome.

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.

推荐答案

http://jiconfont.github.io/

示例:

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

JLabel label = new JLabel(icon);

这篇关于Swing 字体真棒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆