Set font in javafx

前端 未结 3 1586
说谎
说谎 2020-12-06 03:28

How to set font to a column in table view in java fx. I have a table with 3 columns and i want to set different fonts for each of the columns. Also, is it possible to change

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 04:14

    you can use fxml or css file to set fonts color ......

     # .mainFxmlClass {
     -fx-font-family:nyala,Tahoma,Arial,Helvetica,sans-serif;   
     -fx-font-size:1.13em;  
     }
    
     .label{
     -fx-font-size:1.3em;
      }
    

    and call and use .lable or .mainFxmlClass in the fxml file

提交回复
热议问题