Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX closable tabs

974949Nov 19 2012 — edited Nov 19 2012
Hello all,

I've been trying to create a tabpane with closeable tabs, but the close buttons don't appear. I used scene builder, putting in a scene a tabpane and two tabs, settin closeable to true in each one, to no avail.

Also, I've tried writing it by code:


Tab tab = new Tab(titulo);
final ObservableList<Tab> tabs = getTabPane().getTabs();
tab.setContent(myControl);
tab.setClosable(true);
tabs.add(tab);

With this code, the close button does not appear either. What am I doing wrong?

Thanks for your help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2012
Added on Nov 19 2012
2 comments
566 views