What I really miss and I cant get it to work is a closing button on a Tab in the JFXTabPane.
Is this a known issue or is there a work around?
yeah , it's a known issue, it's planned to be implemented.
I have same issue could you please tell me is this resolve or not?
well this issue is not resolved yet in master branch, this issue is more of a design issue.
We need a material design behavior to integrate the close button in JFXTabPane, otherwise it feels off in the header.
Feel free to suggest any design for this issue and contribute to JFonenix.
Regards,
@jfoenixadmin, take a look on this plunkr example (not mine):
http://plnkr.co/edit/PupIBn?p=preview
It could be an idea, how to place the close button. Would be great, if we could have this feature soon!
I love your work so far, thanks!
Edit; I made a workaround with a contextmenu (close, close all, close all but this) (does work for my desktop application, but may be wrong for mobile/web/touch applications)
Bump @jfoenixadmin
I think that example above is a good solution. This issue is already 1.5yr old and should be taken as a higher priority. This is frequently asked feature.
Well @skmedix, #241 is a good implementation (having a close policy) however the ui feels off.
Maybe the 'X' button should be part of the tab content or should only appear when holding the tab title,
Not sure if this is the right design / behavior. A designer opinion here would be appreciated before closing this issue.
Regards,
Reading off of https://material.io/components/android/catalog/tab-layout/, the sentence "the Material Design guidelines for individual tabs is done in the tabs themselves" seems to suggest that the closing of the tab should be handled from within the individual tab content, and not the tab directly.
An alternative would be a long-press on the tab to have a close button/menu appear, but that would be problematic if the tab size horizontally is small/limited.
@jfoenixadmin Soon we will have an official solution.

Cool, however I think they will simply add 'x' button right next to the tab title xD
Hello, I pushed an updated for JFXTabPane to support CLOSE_ALL_TABS policy.
I might update it later once the official solution is out.
Regards,
As a temporarry solution ,You can add a ContextMenu to each tab like this example :
tabpane.getTabs().stream().forEach(tab->{
ContextMenu contextMenu=new ContextMenu();
MenuItem closeItem=new MenuItem();
closeItem.setOnAction(actionEvent->{ tabPane.getTabs().remove(tab);});
contextMenu.getItems().add(closeItem);
tab.setContextMenu(contextMenu);
}
How to build this project?
where and how to use com.sun.javafx ??
can u help me? pls sir,
you can build JFoenix by running gradle build using the following command gradlew build
i have tried that ,but it didn't work
@God-Hand Just make a new Issue for that.
will close this issue as JFXTabPane now supports CLOSE_ALL_TABS policy
:smile: :+1: after long... time this issue was rise. it solved now... :wave:
thnx
Hello,
how to change color of close button?
Most helpful comment
@jfoenixadmin, take a look on this plunkr example (not mine):
http://plnkr.co/edit/PupIBn?p=preview
It could be an idea, how to place the close button. Would be great, if we could have this feature soon!
I love your work so far, thanks!
Edit; I made a workaround with a contextmenu (close, close all, close all but this) (does work for my desktop application, but may be wrong for mobile/web/touch applications)