<dependency> <groupId>org.webjars</groupId> <artifactId>font-awesome</artifactId> <version>{fontawesome-version}</version> </dependency> import org.webjars.FontAwesome; import org.webjars.cssexpressionexpression.awesome.FontAwesomeIcon; FontAwesomeIcon icon = FontAwesomeIcon.create(FontAwesome.IconName.CAMERA); import javax.swing.*; import java.awt.*; public class FontAwesomeExample { public static void main(String[] args) { JFrame frame = new JFrame("Font Awesome Example"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300, 200); FontAwesomeIcon icon = FontAwesomeIcon.create(FontAwesome.IconName.CAMERA); JLabel label = new JLabel(); frame.getContentPane().add(label); frame.setVisible(true); } }


上一篇:
下一篇:
切换中文