title: register a button click in an if statement
body: <p>Here is my code:</p>
  
  <pre><code>else if (roomNumber == 3) {
              txtAreaDisplay.append("Oh no, it looks like you have run into a monster!\n"
                      + "The monster runs straight at you, looking for a fight.\n"
                      + "Are you going to fight, or run?\n");
  
              //fight
              if (btnFight.getModel().isPressed()) {
                  txtAreaDisplay.append("You have chosen to fight the monster!\n");
              }
  
              //run
              else if (btnRun.getModel().isPressed()) {
                  txtAreaDisplay.append("You have chosen to attempt to run away from the monster!\n");
              }
          }
  </code></pre>
  
  <p>My question is, how do I go about registering the button click in the if statement (if that makes sense)? I have the line: <code>(btnFight.getModel().isPressed())</code> but that does not seem to work because when I press the button, the next line is not outputted.</p>
  
  <p>Any help is greatly appreciated!</p>