title: Mouse exited on inner component hover
body: <p>I have created a JFrame with a JPanel containing different components, and for example I want the JPanel to have a visible border and a visible image when the mouse is inside the bounds of the JPanel. My problem is that as soon as the mouse hovers over an "interactable" component inside the JPanel it will register as the mouse exited the JPanel. I'd like it to draw these things as long as it's inside the bounds of the JPanel, and when the mouse exits the JPanel's bounds the border and image "dissappear". Is there any way to achieve this?</p>
  
  <p>Here's a little demo:</p>
  
  <pre><code>public class Test {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
          new TestFrame();
      }
  
      static class TestFrame extends JFrame{
          JPanel panel;
          JButton hoverButton;
          JButton appearingButton;
          public TestFrame() {
              super();
              this.setDefaultCloseOperation(EXIT_ON_CLOSE);
              panel = new JPanel();
              panel.setBackground(Color.red);
              hoverButton = new JButton("Hover me!");
              appearingButton = new JButton("I appeared!");
              appearingButton.setVisible(false);
              panel.add(hoverButton);
              panel.add(appearingButton);
              panel.addMouseListener(new java.awt.event.MouseAdapter() {
                  public void mouseEntered(java.awt.event.MouseEvent evt) {
                      System.out.println("Entered!");
                      appearingButton.setVisible(true);
                  }
                  public void mouseExited(java.awt.event.MouseEvent evt) {
                      System.out.println("Exited!");
                      appearingButton.setVisible(false);
                  }
              });
              add(panel);
              setSize(new Dimension(200, 200));
              setVisible(true);
          }
  
      }
  
  }</code></pre>
  
  <p>While having the mouse inside the JPanel (covering the full JFrame) the second button will appear. Hovering over the first button will however make the second button dissappear. I'd like the second button to show as long as you are inside the bounds of the JPanel.</p>