import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class TabFolderTest { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final TabFolder tabFolder = new TabFolder(shell, SWT.TOP); createTabItem("Item 1", tabFolder); createTabItem("Item 2", tabFolder); shell.setSize(400, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } private static void createTabItem(String text, TabFolder tabFolder) { final TabItem tabItem = new TabItem(tabFolder, SWT.NONE); tabItem.setText(text); final Composite composite = new Composite(tabFolder, SWT.NONE); tabItem.setControl(composite); composite.setLayout(new GridLayout()); new Label(composite, SWT.NONE).setText("Label"); new Button(composite, SWT.CHECK).setText("Checkbox"); } }