问题
I'm using javafx 2.0. I want to add an icon to the Tab in fxml:
example:
<TabPane>
<tabs>
<Tab text="abc" >
</Tab>
</tabs>
</TabPane>
回答1:
I found a solution:
<Tab>
<graphic>
<ImageView>
<image>
<Image url="@image.png"/>
</image>
</ImageView>
</graphic>
<content>
...
</content>
</Tab>
来源:https://stackoverflow.com/questions/9648485/how-to-add-an-icon-to-the-tab-control-in-fxml