Buggy code:
public class TableItem extends Item { Table parent ; Image [ ] images ; int stringList ; int imageList ; int foregroundList ; int backgroundList ; int fontList ; int checkState ; boolean checked ; boolean grayed ; boolean cached ; boolean ignoreNotify ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , int handle ) { } protected void checkSubclass ( ) { } void columnAdded ( int index ) { } void columnRemoved ( int index ) { } void createHandle ( ) { } void clear ( ) { } void deregister ( ) { } void destroyWidget ( ) { } int findRowPresenter ( int current , int rowPresenterType ) { } int findPart ( int column , String partName ) { if ( ! ( OS . FrameworkElement_IsLoaded ( handle ) ) ) <START_BUG> OS . UIElement_UpdateLayout ( handle ) ; <END_BUG> if ( ! ( OS . FrameworkElement_IsLoaded ( handle ) ) ) return 0 ; int rowPresenterType = OS . GridViewRowPresenter_typeid ( ) ; int rowPresenter = findRowPresenter ( handle , rowPresenterType ) ; int contentPresenter = OS . VisualTreeHelper_GetChild ( rowPresenter , column ) ; int columns = OS . GridView_Columns ( parent . gridViewHandle ) ; int columnHandle = OS . GridViewColumnCollection_default ( columns , column ) ; int cellTemplate = OS . GridViewColumn_CellTemplate ( columnHandle ) ; int name = createDotNetString ( partName , false ) ; int result = OS . FrameworkTemplate_FindName ( cellTemplate , name , contentPresenter ) ; OS . GCHandle_Free ( rowPresenterType ) ; OS . GCHandle_Free ( rowPresenter ) ; OS . GCHandle_Free ( contentPresenter ) ; OS . GCHandle_Free ( columns ) ; OS . GCHandle_Free ( columnHandle ) ; OS . GCHandle_Free ( cellTemplate ) ; OS . GCHandle_Free ( name ) ; return result ; } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getImageIndent ( ) { } String getNameText ( ) { } public Table getParent ( ) { } public String getText ( ) { } public String getText ( int index ) { } Control getWidgetControl ( ) { } void register ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } void updateCheckState ( boolean notify ) { } }

Fix:
updateLayout ( handle ) ;