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());
  }
  Font oldValue=previewLabel.getFont();
  previewLabel.setFont(font);
  firePropertyChange("font",oldValue,font);
  updatingComponents=false;
}

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 ( ) ) ; } 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 .
