import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.SWT; public class NewToolBar extends org.eclipse.swt.widgets.ToolBar { public static void main(String[] args) {
try {
Display display = Display.getDefault();
Shell shell = new Shell(display);
new NewToolBar(shell, SWT.NULL); shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
} catch (Exception e) {
e.printStackTrace();
}
} public NewToolBar(Shell parent, int style) {
super(parent, style);
new ToolItem(this, SWT.NULL);
} } |