Buggy code:
@ Override public void blockCleared ( ) { } @ Override public void detailBlocksCleared ( ) { } public void enterInsert ( EJDataRecord record ) { } public void enterQuery ( EJDataRecord queryRecord ) { } public void enterUpdate ( EJDataRecord recordToUpdate ) { } @ Override public void gainFocus ( ) { } @ Override public EJInsertScreenRenderer getInsertScreenRenderer ( ) { } @ Override public EJQueryScreenRenderer getQueryScreenRenderer ( ) { } @ Override public EJUpdateScreenRenderer getUpdateScreenRenderer ( ) { } @ Override public boolean hasFocus ( ) { } @ Override public void initialiseRenderer ( EJEditableBlockController block ) { } @ Override public boolean isCurrentRecordDirty ( ) { } @ Override public void queryExecuted ( ) { } public void selectRow ( int selectedRow ) { } @ Override public void recordDeleted ( int dataBlockRecordNumber ) { } @ Override public void recordInserted ( EJDataRecord record ) { } @ Override public void refreshBlockProperty ( EJManagedBlockProperty arg0 ) { } @ Override public void refreshBlockRendererProperty ( String arg0 ) { } @ Override public void setFocusToItem ( EJScreenItemController arg0 ) { } @ Override public void setHasFocus ( boolean focus ) { } protected void showFocusedBorder ( boolean focused ) { } @ Override public void executingQuery ( ) { } @ Override public int getDisplayedRecordNumber ( EJDataRecord record ) { } @ Override public int getDisplayedRecordCount ( ) { } @ Override public EJDataRecord getFirstRecord ( ) { } @ Override public EJDataRecord getLastRecord ( ) { } @ Override public EJDataRecord getRecordAt ( int displayedRecordNumber ) { } @ Override public EJDataRecord getRecordAfter ( EJDataRecord record ) { } @ Override public EJDataRecord getRecordBefore ( EJDataRecord record ) { } @ Override public EJDataRecord getFocusedRecord ( ) { } @ Override public void recordSelected ( EJDataRecord record ) { } @ Override public void refreshAfterChange ( EJDataRecord record ) { } protected void refresh ( ) { } @ Override public void refreshItemProperty ( String itemName , EJManagedScreenProperty managedItemPropertyType , EJDataRecord record ) { } @ Override public void refreshItemRendererProperty ( String arg0 , String arg1 ) { } @ Override public void synchronize ( ) { } @ Override public Object getGuiComponent ( ) { } @ Override public Node createComponent ( ) { } void addColumns ( ObservableList < TableColumn < EJDataRecord , ? > > columns , EJItemGroupProperties groupProperties ) { } TableColumn < EJDataRecord , ? > createScreenItem ( EJCoreMainScreenItemProperties itemProps ) { if ( itemProps . isSpacerItem ( ) ) { return null ; } EJScreenItemController item = _block . getScreenItem ( MAIN , itemProps . getReferencedItemName ( ) ) ; EJManagedItemRendererWrapper renderer = item . getManagedItemRenderer ( ) ; if ( renderer != null ) { EJFrameworkExtensionProperties blockProperties = itemProps . getBlockRendererRequiredProperties ( ) ; EJFXAppItemRenderer itemRenderer = ( ( EJFXAppItemRenderer ) ( renderer . getUnmanagedRenderer ( ) ) ) ; TableColumn < EJDataRecord , EJDataRecord > labelProvider = itemRenderer . createColumnProvider ( itemProps , item ) ; if ( labelProvider != null ) { String labelOrientation = blockProperties . getStringProperty ( COLUMN_ALIGNMENT ) ; if ( labelOrientation != null ) switch ( labelOrientation ) { case EJFXMultiRecordBlockDefinitionProperties . COLUMN_ALLIGN_LEFT : labelProvider . getStyleClass ( ) . add ( "ej-column-header-left" ) ; break ; case EJFXMultiRecordBlockDefinitionProperties . COLUMN_ALLIGN_RIGHT : labelProvider . getStyleClass ( ) . add ( "ej-column-header-right" ) ; break ; case EJFXMultiRecordBlockDefinitionProperties . COLUMN_ALLIGN_CENTER : labelProvider . getStyleClass ( ) . add ( "ej-column-header-center" ) ; break ; default : break ; } int displayedWidth = blockProperties . getIntProperty ( DISPLAY_WIDTH_PROPERTY , 0 ) ; if ( displayedWidth == 0 ) { if ( ( itemProps . getLabel ( ) ) != null ) displayedWidth = ( itemProps . getLabel ( ) . length ( ) ) + 2 ; else displayedWidth = 5 ; } String visualAttribute = blockProperties . getStringProperty ( VISUAL_ATTRIBUTE_PROPERTY ) ; if ( visualAttribute != null ) { EJCoreVisualAttributeProperties va = EJCoreProperties . getInstance ( ) . getVisualAttributesContainer ( ) . getVisualAttributeProperties ( visualAttribute ) ; if ( va != null ) itemRenderer . setInitialVisualAttribute ( va ) ; } labelProvider . setCellValueFactory ( new Callback < TableColumn . CellDataFeatures < EJDataRecord , EJDataRecord > , ObservableValue < EJDataRecord > > ( ) { public ObservableValue < EJDataRecord > call ( final TableColumn . CellDataFeatures < EJDataRecord , EJDataRecord > p ) { return new ObservableValue < EJDataRecord > ( ) { @ Override public void removeListener ( InvalidationListener arg0 ) { } @ Override public void addListener ( InvalidationListener arg0 ) { } @ Override public void removeListener ( ChangeListener < ? super EJDataRecord > arg0 ) { } @ Override public EJDataRecord getValue ( ) { return p . getValue ( ) ; } @ Override public void addListener ( ChangeListener < ? super EJDataRecord > arg0 ) { } } ; } } ) ; labelProvider . setId ( itemProps . getReferencedItemName ( ) ) ; labelProvider . setText ( itemProps . getLabel ( ) ) ; labelProvider . setResizable ( blockProperties . getBooleanProperty ( ALLOW_COLUMN_RESIZE , true ) ) ; labelProvider . setSortable ( blockProperties . getBooleanProperty ( ALLOW_ROW_SORTING , true ) ) ; if ( blockProperties . getBooleanProperty ( ALLOW_ROW_SORTING , true ) ) { Comparator < EJDataRecord > columnSorter = itemRenderer . getColumnSorter ( itemProps , item ) ; if ( columnSorter != null ) labelProvider . setComparator ( columnSorter ) ; } final Text text = new Text ( "A" ) ; text . snapshot ( null , null ) ; <START_BUG> double avgCharWidth = ( text . getLayoutBounds ( ) . getWidth ( ) ) + 5 ; <END_BUG> if ( avgCharWidth > 0 ) { labelProvider . setPrefWidth ( ( ( int ) ( ( displayedWidth + 1 ) * avgCharWidth ) ) ) ; } return labelProvider ; } } return null ; } private Node createGridData ( EJMainScreenProperties layoutItem , Node node ) { } void setInputs ( ) { } }

Fix:
double avgCharWidth = text . getLayoutBounds ( ) . getWidth ( ) ;