JavaFx - Tab closable button


Question

I've created a Tab and added it to the TabPane. I have set its closable property to TRUE. How can I get the close button to show?

1
8
8/17/2015 2:04:06 AM

Accepted Answer

I was looking for answer long time, answer is very simple.

Just have to set TabClosingPolicy

TabPane.TabClosingPolicy.SELECTED_TAB

20
3/9/2013 1:03:23 PM

In fxml file property can be added in tabplane as tabClosingPolicy="SELECTED_TAB" or "ALL_TABS"


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon