title: Beginner Error with JOptionPane showmessagedialog
body: <p>I have been following a tutorial on YouTube for Java using Eclipse.</p>
  
  <p>Currently I am trying to multiply two doubles and output the result as a double using <code>JOptionPane.showMessageDialog</code> but it is giving me an error.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import javax.swing.JOptionPane;
  
  public class Variables {
    public static void main(String arg[])
    {
      double length = 3;
      double width = 2;
      double area = length*width;
      JOptionPane myIO = new JOptionPane();
      myIO.showMessageDialog(null, area);
    }
  }
  </code></pre>
  
  <p>and the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    The method showMessageDialog(Component, Object) in the type JOptionPane
        is not applicable for the arguments (null, double)
      at Variables.main(Variables.java:11)
  </code></pre>
  
  <p>I have exactly what I see in the tutorial so I don't have a clue what I am doing wrong. I feel like I didn't import some library or something that I should have but it seems like Eclipse recognizes <code>JOptionPane</code> and <code>showMessageDialog</code>.</p>