// Note: There seems to be some extra space below the tabs // when using JTattoo. FlatLAF works fine. // TODO: changing tabs at runtime, event handling etc. sclass JExtendedTabbedPane is Swingable { JTabbedPane tabs; new L components; SingleComponentPanel scpBesideTabs = scp(); SingleComponentPanel scpPage = scp(); *(JTabbedPane _tabs) swing { tabs = _tabs != null ? _tabs : jtabs(); int n = tabCount(tabs); for i to n: { components.add(tabs.getComponentAt(i)); tabs.setComponentAt(i, emptyPage()); } onTabSelectedAndNow(tabs, idx -> scpPage.set(get(components, idx)); } // Something with minimum size 0 Component emptyPage() { ret verticalStrut(0); } cachedVisual northAndCenter(centerAndEastWithMargin( tabs, scpBesideTabs), scpPage); selfType setComponentBesideTabs(Component c) { scpBesideTabs.set(c); this; } }