Image image = ( ( CTabItem ) event.item ).getImage(); if ( image != null ) image.dispose();
item.getImage().dispose();
	private void createRightGroup() {		/* right group */		cTabFolder = new CTabFolder( tabFolderPage, SWT.NONE );		cTabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );		cTabFolder.marginWidth = 5;		/* set this as data, so our children in the ctabfolder know whos their dad ;) */		cTabFolder.setData( this );				/* add a "X" and listen for close event */		cTabFolder.addCTabFolderListener( new CTabFolderAdapter() {			public void itemClosed( CTabFolderEvent event ) {				SearchResult result = ( SearchResult ) event.item.getData();				result.dispose();				result = null;				/* dispose the tabitem image */				Image image = ( ( CTabItem ) event.item ).getImage();					if ( image != null )					image.dispose();				/* close the tab item */				if ( event.item != null )					event.item.dispose();				/* set the new statusline */				if ( cTabFolder.getItemCount() != 0 ) {					SearchResult nResult = ( SearchResult ) cTabFolder.getSelection().getData();					setRightLabel( nResult.getStatusLine() );					mainWindow.statusline.update( nResult.getStatusLine() );					mainWindow.statusline.updateToolTip( "" );				}				else {					setRightLabel("");					mainWindow.statusline.update( "" );					mainWindow.statusline.updateToolTip( "" );				}			}		} );				cTabFolder.addFocusListener( new FocusListener () {			public void focusGained( FocusEvent e ) {			}			public void focusLost( FocusEvent e ) { 				/* we are in focus, set our result count */				CTabFolder item = ( CTabFolder ) e.widget;				if ( item.getSelection() != null ) {					SearchResult result = ( SearchResult ) item.getSelection().getData();					setRightLabel( result.getStatusLine() );					mainWindow.statusline.update( result.getStatusLine() );					mainWindow.statusline.updateToolTip( "" );				}			}		} );			//VNC need real colors/*		Color fgColor = new Color( cTabFolder.getDisplay(), 10, 10, 10 );		Color[] bgColors { };		int[] bgPercents = { 1, 2, 3 };		cTabFolder.setSelectionForeground( fgColor );		cTabFolder.setSelectionBackground( bgColors, bgPercents );*/	}