Label label = (Label) (tip.getChildren() [0]);
Display display = tip.getDisplay(); label.setForeground (display.getSystemColor (SWT.COLOR_INFO_FOREGROUND)); label.setBackground (display.getSystemColor (SWT.COLOR_INFO_BACKGROUND));
private void showToolTip (int x, int y) {	CTabItem item = getItem(new Point (x, y));	if (item != null) {		if (item == toolTipItem) return;		toolTipItem = item;		String tooltip = item.getToolTipText();		if (tooltip != null) {						Label label = (Label) (tip.getChildren() [0]);			label.setText(tooltip);			Display display = tip.getDisplay();			Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);			Color background = display.getSystemColor (SWT.COLOR_INFO_BACKGROUND);			label.setForeground (foreground);			label.setBackground (background);			tip.setBackground(background);			tip.pack();			Point pt = new Point(item.x + item.width / 4, item.y + item.height + 2);			pt = toDisplay(pt);			/*			* Ensure that the tooltip is on the screen.			*/			Rectangle rect = display.getBounds();			Point size = tip.getSize();			pt.x = Math.max (0, Math.min (pt.x, rect.width - size.x));			pt.y = Math.max (0, Math.min (pt.y, rect.height - size.y));			tip.setLocation(pt);			tip.setVisible(true);			return;		}	}		toolTipItem = null;	if (tip != null && !tip.isDisposed() && tip.isVisible()) tip.setVisible(false);}