Buggy code:
public class SwingInstall extends JFrame { public SwingInstall ( ) { } Install installer ; OSTask [ ] osTasks ; String appName ; String appVersion ; JLabel caption ; SwingInstall . ChooseDirectory chooseDirectory ; SwingInstall . SelectComponents selectComponents ; SwingInstall . SwingProgress progress ; JButton cancelButton ; JButton prevButton ; JButton nextButton ; Component [ ] pages ; int currentPage ; private static final int PADDING = 12 ; void install ( ) { Vector components = new Vector ( ) ; int size = 0 ; JPanel comp = selectComponents . comp ; Vector ids = selectComponents . filesets ; for ( int i = 0 ; i < ( comp . getComponentCount ( ) ) ; i ++ ) { if ( ( ( JCheckBox ) ( comp . getComponent ( i ) ) ) . getModel ( ) . isSelected ( ) ) { size += installer . getIntegerProperty ( ( ( "comp." + ( ids . elementAt ( i ) ) ) + ".real-size" ) ) ; components . addElement ( installer . getProperty ( ( ( "comp." + ( ids . elementAt ( i ) ) ) + ".fileset" ) ) ) ; } } String installDir = chooseDirectory . installDir . getText ( ) ; Map osTaskDirs = chooseDirectory . osTaskDirs ; Iterator keys = osTaskDirs . keySet ( ) . iterator ( ) ; while ( keys . hasNext ( ) ) { OperatingSystem . OSTask osTask = ( ( OperatingSystem . OSTask ) ( keys . next ( ) ) ) ; String dir = ( ( JTextField ) ( osTaskDirs . get ( osTask ) ) ) . getText ( ) ; if ( ( dir != null ) && ( ( dir . length ( ) ) != 0 ) ) { <START_BUG> osTask . setEnabled ( false ) ; <END_BUG> osTask . setDirectory ( dir ) ; } else osTask . setEnabled ( false ) ; } InstallThread thread = new InstallThread ( installer , progress , installDir , osTasks , size , components ) ; progress . setThread ( thread ) ; thread . start ( ) ; } private void pageChanged ( ) { } class ActionHandler implements ActionListener { public void actionPerformed ( ActionEvent evt ) { } } class WindowHandler extends WindowAdapter { public void windowClosing ( WindowEvent evt ) { } } class WizardLayout implements LayoutManager { public void addLayoutComponent ( String name , Component comp ) { } public void removeLayoutComponent ( Component comp ) { } public Dimension preferredLayoutSize ( Container parent ) { } public Dimension minimumLayoutSize ( Container parent ) { } public void layoutContainer ( Container parent ) { } } class TextPanel extends JPanel { TextPanel ( String file ) { } } class ChooseDirectory extends JPanel { JTextField installDir ; Map osTaskDirs ; ChooseDirectory ( ) { } private JTextField addField ( JPanel directoryPanel , String label , String defaultText ) { } class ActionHandler implements ActionListener { JTextField field ; ActionHandler ( JTextField field ) { } public void actionPerformed ( ActionEvent evt ) { } } } class SelectComponents extends JPanel implements ActionListener { JPanel comp ; JLabel sizeLabel ; Vector filesets ; SelectComponents ( ) { } public void actionPerformed ( ActionEvent evt ) { } private JPanel createCompPanel ( ) { } private void updateSize ( ) { } } class SwingProgress extends JPanel implements Progress { JProgressBar progress ; InstallThread thread ; SwingProgress ( ) { } public void setMaximum ( final int max ) { } public void advance ( final int value ) { } public void done ( ) { } public void error ( final String message ) { } public void setThread ( InstallThread thread ) { } } }

Fix:
osTask . setEnabled ( true ) ;