title: Enable event windowActivated (JFrame) from JPanel
body: <p>I have this problem: I'm builting a game. I'm trying check if the missionA is complete, pass to MissionB.</p>
  
  <p>I have a StageClass (extends JFrame), this:</p>
  
  <pre><code>public class Stage extends JFrame {
    Scene missionOne;
  public Stage(){
    //Code
    missionOne=new Scene();
    add(missionOne);
    addWindowListener(new java.awt.event.WindowAdapter(){         
          public void windowActivated(java.awt.event.WindowEvent evt){
              checkMissionState();
          }
      });
  }
  
  private void checkMissionState(){
          if(missionOne.complete()){          
              //ChangeMission
          }
      }
  }
  </code></pre>
  
  <p>In the scene class:</p>
  
  <pre><code>public class Scene extends JPanel implements ActionListener,KeyListener {
     //Allcode
     public boolean complete(){
       boolean sw=false;
       //Verify a list of conditions
       return sw;
     }
  </code></pre>
  
  <p>When mission is complete, I don't get execute checkMissionState(). The reason is that the focus in this moment is Scene. I tried windowLostFocus, windowDeactivated and doesn't execute too.</p>
  
  <p>I can get a solution sending on the screen a JOptionPane message from complete()</p>
  
  <pre><code>public class Scene extends JPanel implements ActionListener,KeyListener {
    //Allcode
  
     public boolean complete(){
       boolean sw=false;
       //Verify a list of conditions 
      if(sw) JOptionPane.showMessageDialog(null,"Mission is complete");
        return sw;
  }
  </code></pre>
  
  <p>Works. But this quit Jugagability at Game.</p>
  
  <p>I'm searching a form of execute checkMissionState() in JFrame without                            sending JOptionPane message. </p>
  
  <p>How could do it?</p>