How to add an icon to the Tab control in FXML?
-
10-12-2019 - |
Question
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>
Solution
I found a solution:
<Tab>
<graphic>
<ImageView>
<image>
<Image url="@image.png"/>
</image>
</ImageView>
</graphic>
<content>
...
</content>
</Tab>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow