public ToolBarExamples() {
		this.toolBar = new ToolBar(this.shell, SWT.NONE);

		ToolItem itemPush = new ToolItem(this.toolBar, SWT.PUSH);
		itemPush.setText("PUSH item");

		ToolItem itemCheck = new ToolItem(this.toolBar, SWT.CHECK);
		itemCheck.setText("CHECK item");

		ToolItem itemRadio1 = new ToolItem(this.toolBar, SWT.RADIO);
		itemRadio1.setText("RADIO item 1");

		ToolItem itemRadio2 = new ToolItem(this.toolBar, SWT.RADIO);
		itemRadio2.setText("RADIO item 2");

		ToolItem itemSeparator = new ToolItem(this.toolBar, SWT.SEPARATOR);
		Text text = new Text(this.toolBar, SWT.BORDER | SWT.SINGLE);
		text.pack();
		itemSeparator.setWidth(text.getBounds().width);
		itemSeparator.setControl(text);

		final ToolItem itemDropDown = new ToolItem(this.toolBar, SWT.DROP_DOWN);
		itemDropDown.setText("DROP_DOWN item");
		itemDropDown.setToolTipText("Click here to see a drop down menu ...");

		final Menu menu = new Menu(this.shell, SWT.POP_UP);
		new MenuItem(menu, SWT.PUSH).setText("Menu item 1");
		new MenuItem(menu, SWT.PUSH).setText("Menu item 2");
		new MenuItem(menu, SWT.SEPARATOR);
		new MenuItem(menu, SWT.PUSH).setText("Menu item 3");

		itemDropDown.addListener(SWT.Selection, new Listener() {
			public void handleEvent(Event event) {
				if (event.detail == SWT.ARROW) {
					Rectangle bounds = itemDropDown.getBounds();
					Point point = ToolBarExamples.this.toolBar.toDisplay(bounds.x, bounds.y + bounds.height);
					menu.setLocation(point);
					menu.setVisible(true);
				}
			}
		});

		Listener selectionListener = new Listener() {
			public void handleEvent(Event event) {
				ToolItem item = (ToolItem) event.widget;
				System.out.println(item.getText() + " is selected");
				if ((item.getStyle() & SWT.RADIO) != 0 || (item.getStyle() & SWT.CHECK) != 0)
					System.out.println("Selection status: " + item.getSelection());
			}
		};

		itemPush.addListener(SWT.Selection, selectionListener);
		itemCheck.addListener(SWT.Selection, selectionListener);
		itemRadio1.addListener(SWT.Selection, selectionListener);
		itemRadio2.addListener(SWT.Selection, selectionListener);
		itemDropDown.addListener(SWT.Selection, selectionListener);

		this.toolBar.pack();

		this.shell.addListener(SWT.Resize, new Listener() {
			public void handleEvent(Event event) {
				Rectangle clientArea = ToolBarExamples.this.shell.getClientArea();
				ToolBarExamples.this.toolBar.setSize(ToolBarExamples.this.toolBar.computeSize(clientArea.width, SWT.DEFAULT));
			}
		});

		this.shell.pack();
		this.shell.open();
		// textUser.forceFocus();

		// Set up the event loop.
		while (!this.shell.isDisposed()) {
			if (!this.display.readAndDispatch()) {
				// If no more entries in event queue
				this.display.sleep();
			}
		}

		this.display.dispose();
	}