title: How do I get a MessageBox like information window to appear in Java?
body: <p>I'm learning Java and I have no idea how to do this.</p>
  
  <p>I dragged a button on the form in Netbeans, double clicked it and it created this event:</p>
  
  <pre><code>@Action
  public void HelloClickMethod() 
  {
      JOptionPane.showMessageDialog(this, "The message!", "This is supposed to be the MessageBox title."); 
  }
  </code></pre>
  
  <p>This is the exception the IDE brings up.</p>
  
  <blockquote>
    <p>Cannot find symbol. Symbol: showMessageDialog()</p>
  </blockquote>
  
  <p><strong>Edit 1></strong>
  Now I changed it to this:</p>
  
  <pre><code>@Action
  public void HelloClickMethod()
  {
      JOptionPane.showMessageDialog(this, "The message!", "This is supposed to be the MessageBox title.",JOptionPane.ERROR_MESSAGE);
  }
  </code></pre>
  
  <p>However the IDE is saying I have an error in the word 'this'. "Cannot find symbol". I don't understand. Why is it so dificult and why are the errors so esoteric. :P</p>