1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| import org.eclipse.swt.custom.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.*;
import org.eclipse.swt.layout.FillLayout;
public class main {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
FillLayout fillLayout = new FillLayout();
shell.setLayout(fillLayout);
CTabFolder tab = new CTabFolder(shell,SWT.NONE);
CTabItem tabGeneral = new CTabItem(tab,SWT.NONE);
tabGeneral.setText("General");
tab.pack();
shell.pack();
shell.setSize(350,400);
shell.open();
while (!shell.isDisposed())
if (!display.readAndDispatch())
display.sleep();
display.dispose();
tab.dispose();
}
} |
Partager