How to add an icon to the Tab control in FXML?

前端 未结 1 1167
温柔的废话
温柔的废话 2021-01-13 17:29

I\'m using javafx 2.0. I want to add an icon to the Tab in fxml:

example:

     
         
            

        
相关标签:
1条回答
  • 2021-01-13 18:07

    I found a solution:

    <Tab> 
        <graphic>
            <ImageView>
                <image>
                        <Image url="@image.png"/>
                </image>
            </ImageView>
        </graphic>
        <content>
            ...
        </content>
    </Tab> 
    
    0 讨论(0)
提交回复
热议问题