title: Accessing JOption Pane's button to add MouseListener to them
body: <p>Right, I thought this would be relatively simple by using <code>.getComponents()</code> on the Component which would return the <code>JPanel</code> of the <code>JOptionPane</code> and them retrieve the <code>JButton</code>s by using that method again with the <code>JPanel</code> however I am facing difficulties.  </p>
  
  <p>I want to use a mouse listener on the <code>JOptionPane</code> buttons so that I can change the color of the button on rollover.  Is there a simpler way of achieving this?    </p>
  
  <p>This is my class so far ..</p>
  
  <pre><code>package rsapp.gui;
  
  import java.awt.Color;
  import java.awt.Component;
  import java.awt.event.ActionListener;
  import java.awt.event.MouseAdapter;
  import java.awt.event.MouseEvent;
  
  
  import javax.swing.JFrame;
  import javax.swing.JOptionPane;
  import javax.swing.UIManager;
  
  
  public class RSJPaneComponent extends JOptionPane {
  
      /**
       * 
       */
      private static final long serialVersionUID = 13453253L;
      private JOptionPane j=this;
      final Color WHITE = Color.WHITE;
  
  
      public RSJPaneComponent(){
          UIManager.put("OptionPane.background",WHITE);
          UIManager.put("Panel.background",WHITE);
          UIManager.put("Button.background",WHITE);
          UIManager.put("Button.foreground",new Color(85,153,187));
          UIManager.put("activeCaption", WHITE);
      }
  
      protected String initJPaneInput(final JFrame f, final String message){
          return j.showInputDialog(f,message);
      }
  
      public int generateDialog(int error_code, String title_message, String message, final JFrame f){
          return  JOptionPane.showConfirmDialog(
                  f,
                  message,
                  "Error "+error_code+": "+title_message,
                  JOptionPane.YES_NO_OPTION);
      }
  }
  </code></pre>