Tabsheet CloseAll Tabs

Is there any similar functionality to CloseAll Tabs of a Tabsheet?
If there is no such thing, any ideas on how to implement it?

Have you tried removeAllComponents(); ?
Or a


for(int i=ts.getComponentCount()-1;I>=0;i--){
ts.removeTab(ts.getTab(i));
}

Hello Clerc,
Thank you for the reply.
my plan was to use something like the code you provided, but I was interested to know if there was some kind of solution already.

And the main problem is not how to close all tabs, but where to call this functionality from. The Firefox tabs have a right click operation over each tab that invokes sth like a ContextMenu. I need to find a similar solution but the ContextMenu addon is not working properly for me right now.