title: How to make itemStateChange method to run when JButton is pressed?
body: <p>I'm adding an ItemListener to JButton but method doesn't run. 
  I read in java API that a JButton can add an object that implements ItemEventListenr interface by addItemListener method.But when pressing on the JButton only actionPerform method runs.I also tried to call </p>
  
  <pre><code>JButton.setSelected(true) 
  </code></pre>
  
  <p>but it didn't make a change.</p>
  
  <pre><code>JFrame frame = new JFrame();
  plainJButton = new JButton( "Plain Button" );
  plainJButton.setSelected(true);
  ButtonHandler handler = new ButtonHandler();
  ButtonItemHandler itemHandler = new ButtonItemHandler();
  plainJButton.addActionListener(handler );
  plainJButton.addItemListener( itemHandler );
  frame.add( plainJButton ); // add plainJButton to JFrame 
  
  // inner class for button event handling
  private class ButtonHandler implements ActionListener 
     {
        // handle button event
        public void actionPerformed( ActionEvent event )
        {
           JOptionPane.showMessageDialog( ButtonFrame.this, String.format(
              "You pressed: %s", event.getActionCommand() ) );
        } // end method actionPerformed
     } // end private inner class ButtonHandler 
  
  
   // inner class for button event handling
  
     private class ButtonItemHandler implements ItemListener
     {
         public void itemStateChanged(ItemEvent e)
         {
             System.out.println(e.getStateChange()+"\n");
             System.out.println(plainJButton.isSelected() +"\n");
         }
     }
  } // end class ButtonFrame
  </code></pre>
  
  <p>I expect itemStateChange method will be run but only actionPerformed method runs.</p>