void (Graphics g) { Rectangle buttonBounds = getCloseButtonScreenBounds(); if (buttonBounds != null) { final PointerInfo info = MouseInfo.getPointerInfo(); myCloseButtonHovered = info != null && buttonBounds.contains(info.getLocation()); } Rectangle bounds = getBounds(); g.setColor(myBackgroundColor); g.fillRoundRect(0, 0, bounds.width, bounds.height, ArrangementConstants.BORDER_ARC_SIZE, ArrangementConstants.BORDER_ARC_SIZE); super.paint(g); }