private void updateComponents ( ) { updatingComponents = true ; Font font = getFont ( ) ; fontList . setSelectedValue ( font . getName ( ) , true ) ; sizeList . setSelectedValue ( font . getSize ( ) , true ) ; boldCheckBox . setSelected ( font . isBold ( ) ) ; italicCheckBox . setSelected ( font . isItalic ( ) ) ; if ( previewText == null ) { previewLabel . setText ( font . getName ( ) ) ; } // set the font and fire a property change Font oldValue = previewLabel . getFont ( ) ; previewLabel . setFont ( font ) ; firePropertyChange ( "font" , oldValue , font ) ; updatingComponents = false ; }
Updates the font in the preview component according to the selected values .