Buggy code:
void createHandle ( ) { } void createHeaderToolTips ( ) { } void createItem ( TableColumn column , int index ) { } void createItem ( TableItem item , int index ) { } void createWidget ( ) { } int defaultBackground ( ) { } void deregister ( ) { } public void deselect ( int [ ] indices ) { } public void deselect ( int index ) { } public void deselect ( int start , int end ) { } public void deselectAll ( ) { } void destroyItem ( TableColumn column ) { } void destroyItem ( TableItem item ) { } void fixCheckboxImageList ( boolean fixScroll ) { } void fixCheckboxImageListColor ( boolean fixScroll ) { } void fixItemHeight ( boolean fixScroll ) { } public TableColumn getColumn ( int index ) { } public int getColumnCount ( ) { } public int [ ] getColumnOrder ( ) { } public TableColumn [ ] getColumns ( ) { } int getFocusIndex ( ) { } public int getGridLineWidth ( ) { } public int getHeaderHeight ( ) { } public boolean getHeaderVisible ( ) { } public TableItem getItem ( int index ) { } public TableItem getItem ( Point point ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public TableItem [ ] getItems ( ) { } public boolean getLinesVisible ( ) { } public TableItem [ ] getSelection ( ) { } public int getSelectionCount ( ) { } public int getSelectionIndex ( ) { } public int [ ] getSelectionIndices ( ) { } public TableColumn getSortColumn ( ) { } public int getSortDirection ( ) { } public int getTopIndex ( ) { } int imageIndex ( Image image ) { } int imageIndexHeader ( Image image ) { } public int indexOf ( TableColumn column ) { } public int indexOf ( TableItem item ) { } public boolean isSelected ( int index ) { } void register ( ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } public void remove ( int [ ] indices ) { } public void remove ( int index ) { } public void remove ( int start , int end ) { } public void removeAll ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void select ( int [ ] indices ) { } public void select ( int index ) { } public void select ( int start , int end ) { } public void selectAll ( ) { } void sendEraseItemEvent ( TableItem item , NMLVCUSTOMDRAW nmcd , int lParam ) { } Event sendMeasureItemEvent ( TableItem item , int row , int column , int hDC ) { int hFont = ( ( item . cellFont ) != null ) ? item . cellFont [ column ] : - 1 ; if ( hFont == ( - 1 ) ) hFont = item . font ; RECT itemRect = item . getBounds ( row , column , true , true , false , false , hDC ) ; int nSavedDC = OS . SaveDC ( hDC ) ; GCData data = new GCData ( ) ; data . device = display ; data . hFont = hFont ; GC gc = GC . win32_new ( hDC , data ) ; Event event = new Event ( ) ; event . item = item ; event . gc = gc ; <START_BUG> event . index = row ; <END_BUG> event . x = itemRect . left ; event . y = itemRect . top ; event . width = ( itemRect . right ) - ( itemRect . left ) ; event . height = ( itemRect . bottom ) - ( itemRect . top ) ; sendEvent ( MeasureItem , event ) ; event . gc = null ; gc . dispose ( ) ; OS . RestoreDC ( hDC , nSavedDC ) ; if ( ( ! ( isDisposed ( ) ) ) && ( ! ( item . isDisposed ( ) ) ) ) { int hwndHeader = OS . SendMessage ( handle , LVM_GETHEADER , 0 , 0 ) ; int count = OS . SendMessage ( hwndHeader , HDM_GETITEMCOUNT , 0 , 0 ) ; if ( ( count == 1 ) && ( ( columns [ 0 ] ) == null ) ) { int width = OS . SendMessage ( handle , LVM_GETCOLUMNWIDTH , 0 , 0 ) ; if ( ( ( event . x ) + ( event . width ) ) > width ) { OS . SendMessage ( handle , LVM_SETCOLUMNWIDTH , 0 , ( ( event . x ) + ( event . width ) ) ) ; } } if ( ! ( ignoreItemHeight ) ) { if ( ( event . height ) > ( getItemHeight ( ) ) ) setItemHeight ( event . height ) ; ignoreItemHeight = true ; } } return event ; } LRESULT sendMouseDownEvent ( int type , int button , int msg , int wParam , int lParam ) { } void sendPaintItemEvent ( TableItem item , NMLVCUSTOMDRAW nmcd ) { } void setBackgroundImage ( int hBitmap ) { } void setBackgroundPixel ( int newPixel ) { } void setBackgroundTransparent ( boolean transparent ) { } void setBounds ( int x , int y , int width , int height , int flags , boolean defer ) { } public void setColumnOrder ( int [ ] order ) { } void setDeferResize ( boolean defer ) { } void setCheckboxImageList ( int width , int height , boolean fixScroll ) { } void setFocusIndex ( int index ) { } public void setFont ( Font font ) { } void setForegroundPixel ( int pixel ) { } public void setHeaderVisible ( boolean show ) { }

Fix:
event . index = column ;