title: Change the cursor when the mouse's over the intersection area of 2 panels
body: <p>I have 2 Jpanel (leftpanel and rightpanel) on JFrame. How can I change the cursor when the mouse's over the intersection area of 2 panels?</p>
  
  <p><img src="https://i.stack.imgur.com/qZPF3.png" alt="enter image description here"> </p>
  
  <p>So far, i tried :</p>
  
  <pre><code> ...
   public void mouseMoved(MouseEvent e) {
             if (leftpanel.contains(e.getPoint()) &amp;&amp; rightpanel.contains(e.getPoint())){
  
                  frame.setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
  
            }
             else{ frame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
          };
  </code></pre>
  
  <p>but it was not working..</p>