Buggy code:
public class GeneralOptionsDialog extends JDialog implements ActionListener { private static final String RESOURCE_PATH = "org.columba.core.i18n.dialog" ; protected JButton okButton ; protected JButton cancelButton ; protected JButton helpButton ; protected JLabel lfLabel ; protected JComboBox lfComboBox ; protected JButton lfButton ; private String theme = null ; private ThemePluginHandler handler ; protected JCheckBox overwriteCheckBox ; protected JLabel mainFontLabel ; protected JLabel textFontLabel ; protected JButton mainFontButton ; protected JButton textFontButton ; private Font mainFont ; private Font textFont ; protected JLabel toolbarLabel ; protected JComboBox toolbarComboBox ; protected JLabel languageLabel ; protected JComboBox languageComboBox ; protected JFrame frame ; protected ConfigPluginHandler configHandler ; protected JLabel proxyLabel ; protected JButton proxyButton ; protected String proxyHost ; protected int proxyPort ; protected String configID ; public GeneralOptionsDialog ( JFrame frame ) { } public void updateComponents ( boolean b ) { } protected void layoutComponents ( ) { } protected void initComponents ( ) { } public void actionPerformed ( ActionEvent event ) { String action = event . getActionCommand ( ) ; if ( action . equals ( "OK" ) ) { setVisible ( false ) ; updateComponents ( false ) ; ThemeSwitcher . setTheme ( ) ; FrameMediator [ ] m = frameModel . getOpenFrames ( ) ; for ( int i = 0 ; i < ( m . length ) ; i ++ ) { <START_BUG> JFrame frame = ( ( JFrame ) ( m [ i ] . getBaseView ( ) ) ) ; <END_BUG> ThemeSwitcher . updateFrame ( frame ) ; } FontProperties . setFont ( ) ; } else if ( action . equals ( "CANCEL" ) ) { setVisible ( false ) ; } else if ( action . equals ( "THEME" ) ) { String theme = ( ( String ) ( lfComboBox . getSelectedItem ( ) ) ) ; configID = handler . getAttribute ( theme , "config" ) ; lfButton . setEnabled ( ( ( configID ) != null ) ) ; } else if ( action . equals ( "THEME_OPTIONS" ) ) { String theme = ( ( String ) ( lfComboBox . getSelectedItem ( ) ) ) ; new ConfigurationDialog ( configID ) ; } Object source = event . getSource ( ) ; if ( source == ( mainFontButton ) ) { FontSelectionDialog fontDialog = new FontSelectionDialog ( null ) ; if ( ( fontDialog . showDialog ( ) ) == ( FontSelectionDialog . APPROVE_OPTION ) ) { mainFont = fontDialog . getSelectedFont ( ) ; mainFontButton . setFont ( mainFont ) ; mainFontButton . setText ( mainFont . getFontName ( ) ) ; } } else if ( source == ( textFontButton ) ) { FontSelectionDialog fontDialog = new FontSelectionDialog ( null ) ; if ( ( fontDialog . showDialog ( ) ) == ( FontSelectionDialog . APPROVE_OPTION ) ) { textFont = fontDialog . getSelectedFont ( ) ; textFontButton . setFont ( textFont ) ; textFontButton . setText ( textFont . getFontName ( ) ) ; } } else if ( source == ( overwriteCheckBox ) ) { boolean enabled = overwriteCheckBox . isSelected ( ) ; mainFontLabel . setEnabled ( enabled ) ; mainFontButton . setEnabled ( enabled ) ; textFontLabel . setEnabled ( enabled ) ; textFontButton . setEnabled ( enabled ) ; } else if ( source == ( proxyButton ) ) { ProxyConfigurationDialog dialog = new ProxyConfigurationDialog ( this ) ; dialog . setProxyHost ( proxyHost ) ; dialog . setProxyPort ( proxyPort ) ; if ( ( dialog . showDialog ( ) ) == ( ProxyConfigurationDialog . APPROVE_OPTION ) ) { proxyHost = dialog . getProxyHost ( ) ; proxyPort = dialog . getProxyPort ( ) ; updateProxyButtonText ( ) ; } } } protected void updateProxyButtonText ( ) { } public Font getMainFont ( ) { } public Font getTextFont ( ) { } }

Fix:
JFrame frame = m [ i ] . getView ( ) . getFrame ( ) ;