Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个选项卡并将其添加到 TabPane。我已将其可关闭属性设置为 TRUE。如何让关闭按钮显示?
找了很久,答案很简单。
只需设置 TabClosingPolicy
TabPane.TabClosingPolicy.SELECTED_TAB
在 fxml 文件中,属性可以在 tabplane 中添加为 tabClosingPolicy="SELECTED_TAB" 或 "ALL_TABS"