title: MouseListener in Java Swing sometimes not respond
body: <p>I've implemented right mouse click for open menu listener on my main Jframe, it works fine except one problem. One out of 5 (give or take) clicks it not responding, this can be very annoying for the user. Here is my code:</p>
  
  <pre><code>contentPane = new JPanel();
  contentPane.addMouseListener(new MouseAdapter() {
  
          @Override
          public void mouseClicked(MouseEvent e) {
  
              if (e.getButton() == MouseEvent.BUTTON3) 
              {
                  //Do Stuff
              }
          }
      });
  </code></pre>
  
  <p>Can you please help me</p>