Use of add method in Tab

May I know when to use the add method available in Tab ?
When I used it, this is what I see
and the code is

Tab test1 = new Tab("test1");
        test1.add(new TextField());

        Tabs tabs = new Tabs(test1);

You use it if you for example wanna add an icon to the tab.

What you are looking for is the tabsheet component - tabs are only the horizontally clicks things; not the whole “sheet”.

1 Like