Buggy code:
public class MainWindow extends JFrame { public MainWindow ( ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { addObject = new JButton ( ) ; editObject = new JButton ( ) ; runSimulation = new JButton ( ) ; stopSimulation = new JButton ( ) ; pauseSimulation = new JButton ( ) ; busAcceleration = new JSlider ( ) ; busDeceleration = new JSlider ( ) ; busAccelerationLabel = new JLabel ( ) ; jLabel2 = new JLabel ( ) ; sillyNetLogo = new JInternalFrame ( ) ; jLabel3 = new JLabel ( ) ; jLabel4 = new JLabel ( ) ; jLabel5 = new JLabel ( ) ; jLabel6 = new JLabel ( ) ; busAccelerationLabelValue = new JLabel ( ) ; busDecelerationLabelValue = new JLabel ( ) ; jMenuBar1 = new JMenuBar ( ) ; jMenu1 = new JMenu ( ) ; jMenu3 = new JMenu ( ) ; jMenu4 = new JMenu ( ) ; jMenu5 = new JMenu ( ) ; jMenu6 = new JMenu ( ) ; setDefaultCloseOperation ( WindowConstants . EXIT_ON_CLOSE ) ; addObject . setText ( "Add<seq2seq4repair_space>Object" ) ; addObject . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { addObjectActionPerformed ( evt ) ; } } ) ; editObject . setText ( "Edit<seq2seq4repair_space>Object" ) ; editObject . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { editObjectActionPerformed ( evt ) ; } } ) ; runSimulation . setText ( "Run<seq2seq4repair_space>Simulation" ) ; runSimulation . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { runSimulationActionPerformed ( evt ) ; } } ) ; stopSimulation . setText ( "Stop<seq2seq4repair_space>Simulation" ) ; pauseSimulation . setText ( "Pause<seq2seq4repair_space>Simulation" ) ; pauseSimulation . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { pauseSimulationActionPerformed ( evt ) ; } } ) ; busAcceleration . addChangeListener ( new ChangeListener ( ) { public void stateChanged ( ChangeEvent evt ) { busAccelerationStateChanged ( evt ) ; } } ) ; busDeceleration . addChangeListener ( new ChangeListener ( ) { public void stateChanged ( ChangeEvent evt ) { busDecelerationStateChanged ( evt ) ; } } ) ; busAccelerationLabel . setText ( "Bus<seq2seq4repair_space>Acceleration" ) ; jLabel2 . setText ( "Bus<seq2seq4repair_space>Deceleration" ) ; sillyNetLogo . setVisible ( true ) ; sillyNetLogo . addInternalFrameListener ( new InternalFrameListener ( ) { public void internalFrameActivated ( InternalFrameEvent evt ) { } public void internalFrameClosed ( InternalFrameEvent evt ) { } public void internalFrameClosing ( InternalFrameEvent evt ) { } public void internalFrameDeactivated ( InternalFrameEvent evt ) { } public void internalFrameDeiconified ( InternalFrameEvent evt ) { } public void internalFrameIconified ( InternalFrameEvent evt ) { } public void internalFrameOpened ( InternalFrameEvent evt ) { } } ) ; GroupLayout sillyNetLogoLayout = new GroupLayout ( sillyNetLogo . getContentPane ( ) ) ; sillyNetLogo . getContentPane ( ) . setLayout ( sillyNetLogoLayout ) ; sillyNetLogoLayout . setHorizontalGroup ( sillyNetLogoLayout . createParallelGroup ( GroupLayout . Alignment . LEADING ) . addGap ( 0 , 316 , Short . MAX_VALUE ) ) ; sillyNetLogoLayout . setVerticalGroup ( sillyNetLogoLayout . createParallelGroup ( GroupLayout . Alignment . LEADING ) . addGap ( 0 , 360 , Short . MAX_VALUE ) ) ; new Thread ( ) { public void run ( ) { try { <START_BUG> final InterfaceComponent comp = new InterfaceComponent ( this ) ; <END_BUG> EventQueue . invokeAndWait ( new Runnable ( ) { public void run ( ) { add ( comp ) ; try { comp . open ( ".//CS278.nlogo" ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } . start ( ) ; jLabel3 . setText ( "0" ) ; jLabel4 . setText ( "100" ) ; jLabel5 . setText ( "0" ) ; jLabel6 . setText ( "100" ) ; busAccelerationLabelValue . setText ( "50" ) ; busDecelerationLabelValue . setText ( "50" ) ; jMenu1 . setText ( "File" ) ; jMenu1 . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { jMenu1ActionPerformed ( evt ) ; } } ) ; jMenu3 . setText ( "New" ) ; jMenu1 . add ( jMenu3 ) ; jMenu4 . setText ( "Open" ) ; jMenu1 . add ( jMenu4 ) ; jMenu5 . setText ( "Save" ) ; jMenu1 . add ( jMenu5 ) ; jMenu6 . setText ( "Exit" ) ; jMenu1 . add ( jMenu6 ) ; jMenuBar1 . add ( jMenu1 ) ; setJMenuBar ( jMenuBar1 ) ; GroupLayout layout = new GroupLayout ( getContentPane ( ) ) ; getContentPane ( ) . setLayout ( layout ) ;

Fix:
final InterfaceComponent comp = new InterfaceComponent ( MainWindow . this ) ;