JavaFX closable tabs
974949Nov 19 2012 — edited Nov 19 2012Hello 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