title: Changing a label during ActionEvent
body: <p>I am trying to enable/disable a label when a button is pressed and i want to do this during the event and not after it. As you can see below, i try to enable/disable the two labels: lblKeyboard and lblGamepad. </p>
  
  <p>They end up running after the "RemoteControl.run();" is executed but i want it to happen before that. Any way i can do that?</p>
  
  <p>Thank you!</p>
  
  <pre><code>JButton btnGamepad = new JButton("Gamepad");
          btnGamepad.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
  
                      if(cont_state == 0){
                          if(RemoteControl.findGamePad() == true){
                              cont_state = 1;
                              game_status = "on";
                          }
                          else{
                              game_status = "off";
                              key_status = "on";
                              JOptionPane.showMessageDialog(null, "Controller not found!");
                              cont_state = 0;
                          }
                      }
  
                      if(cont_state == 1){    
  
                          System.out.println("CONNECTED GAMEPAD!");
                          lblKeyboard.disable();
                          lblGamepad.enable();
                          frame.repaint();
                          RemoteControl.run();
  
                          cont_state = 0;
                      }
  
              }
          });
  </code></pre>