title: How do I get the input from a textfield in a netbeans RCP app?
body: <p>I am making a text based game in Java. I have a text field, enter button, and a label. </p>
  
  <p>What code do i use to scan the text field once the button is clicked and respond?</p>
  
  <p>So that if I type in (launch missile) the label should say (missile launched). </p>
  
  <p>I will be listening to a button <code>actionperformed</code> or maybe a mouseclick event . Something like this</p>
  
  <pre><code>private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
  if (Text field says: launch missile)
     {print on label:Missile launched}
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if (text field says: invade)
     {Print on label: Invasion started}
  </code></pre>