title: JRadioButton and JCheckBox don't respond to right mouse click
body: <p>I am trying to have JRadioButtons and JCheckBoxes that respond to right mouse clicks as well as left mouse clicks.  I am finding that they don't respond to right mouse clicks properly, but I can't figure out why.</p>
  
  <pre><code>private JRadioButton btn1 = new JRadioButton("1");
  private JRadioButton btn2 = new JRadioButton("2");
  private JRadioButton btn3 = new JRadioButton("3");
  private JCheckBox btn4 = new JCheckBox("4");
  private JCheckBox btn5 = new JCheckBox("5");
  
  private ButtonGroup group = new ButtonGroup();
  
  private void setupActionListeners() {
      btn1.addMouseListener(createMouseAdapter(btn1));
      btn2.addMouseListener(createMouseAdapter(btn2));
      btn3.addMouseListener(createMouseAdapter(btn3));
      btn4.addMouseListener(createMouseAdapter(btn4));
      btn5.addMouseListener(createMouseAdapter(btn5));
      group.add(btn1);
      group.add(btn2);
      group.add(btn3);
  }
  
  private MouseAdapter createMouseAdapter(final AbstractButton button) {
      return new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
             System.out.println("Button " + button.getText() + " selected = " + button.isSelected());
          }
      };
  }
  </code></pre>
  
  <p>I used a program like above to see what the state of the buttons are when left or right mouse clicks are done.  It looks like in 3 of the cases, the right click values are wrong.</p>
  
  <p>Could this be a bug in Java, or am I doing something wrong?</p>
  
  <p>State results (sorry for the look, couldn't find a good way to add a table to this entry)</p>
  
  <p>Button Type    <strong>Mouse Button</strong>    Button status at click time    <strong>button.isSelected() in mouseClicked</strong></p>
  
  <hr>
  
  <p>JRadioButton    <strong>left</strong>         not selected                        <strong>TRUE</strong></p>
  
  <p>JRadioButton    <strong>right</strong>            not selected                        <strong>FALSE</strong> &lt;- wrong?</p>
  
  <p>JRadioButton    <strong>left</strong>             selected                            <strong>TRUE</strong></p>
  
  <p>JRadioButton    <strong>right</strong>            selected                            <strong>TRUE</strong></p>
  
  <p>JCheckBox       <strong>left</strong>             not selected                        <strong>TRUE</strong></p>
  
  <p>JCheckBox       <strong>right</strong>            not selected                        <strong>FALSE</strong> &lt;- wrong?</p>
  
  <p>JCheckBox       <strong>left</strong>             selected                            <strong>FALSE</strong></p>
  
  <p>JCheckBox       <strong>right</strong>            selected                            <strong>TRUE</strong>  &lt;- wrong?</p>