How to use font awesome in a fxml project (javafx)

后端 未结 6 461
深忆病人
深忆病人 2020-11-29 11:02

I want to use font font awesome in my project but I have no idea how to use font awesome in my project.

I had found some example but they can\'t be use in fxml.

6条回答
  •  感情败类
    2020-11-29 11:41

    If you use SceneBuilder try this.

    • First, download 'fontawesomefx'.
    • Second, import jar to SceneBuilder using SceneBuilder's Jar/FXML Manager.
    • Third, Library search for FontAwesomeIconView, GlyphCheckBox, MaterialDesignIconView, MaterialIconView, or WeatherIconView

    Sample FXML:

    
    
    
    
    
    
    
    
    
    
    
    
    
       
          
             
                
                
                
                
                
             
          
       
    
    

    Don't forget to add these jars to your project's classpath!

提交回复
热议问题