Dynamic Tabs

I’m adding tabs to TabSheet dynamically. Now the problem is, it is getting duplicated. I tried to find if there is a method in Tabsheet to let me know if there is a tab with a label already exists. Looks there is none. How do I prevent duplicate tabs?

Never use tabsheets, but I think you could iterate over its children e.g. .getChildren() and validate the value of the label before attempting to append a new tab

I would look into making the logic you use to manage the tabs more robust, e.g. by keeping track of existing tabs through a Map<String, Tab> or something.

Good Idea