Assuming that the events mouseEnteredand mouseExitednot enough (it was for me as much as I wanted to avoid additional challenges mouseExitedwhen the mouse entered the border button within the panel), I came up with this short test to add to the beginning of the event handlers mouseEntered, and mouseExited:
public static boolean isMouseWithinComponent(Component c)
{
Point mousePos = MouseInfo.getPointerInfo().getLocation();
Rectangle bounds = c.getBounds();
bounds.setLocation(c.getLocationOnScreen());
return bounds.contains(mousePos);
}