void (@NotNull Rectangle bounds) { Dimension closeSize = myCloseButton.getPreferredSize(); Insets borderInsets = myBalloon.getShadowBorderInsets(); int x = bounds.x + bounds.width - borderInsets.right - closeSize.width - myLayoutData.configuration.rightActionsOffset.width; int y = bounds.y + borderInsets.top + myLayoutData.configuration.rightActionsOffset.height; myCloseButton.setBounds(x - CloseHoverBounds.x, y - CloseHoverBounds.y, closeSize.width + CloseHoverBounds.width, closeSize.height + CloseHoverBounds.height); if (myMoreButton != null) { Dimension size = myMoreButton.getPreferredSize(); myMoreButton.setBounds(x - size.width - myLayoutData.configuration.gearCloseSpace, y, size.width, size.height); } }