title: button click showMessage in java
body: <p>I have created a button in a JApplet. How can I use it to open a message box?</p>
  
  <pre><code>okButton = new Button("Miow");
  okButton.setBounds(20,20,1150,30);
  add(okButton);
  
  //like
  if(okButton)
  {
      JOptionPane.showMessage......
  }
  </code></pre>