void (@NotNull Rectangle lpBounds) { if (myCloseButton == null || !myCloseButton.isVisible()) { return; } Icon icon = getCloseButton(); int iconWidth = icon.getIconWidth(); int iconHeight = icon.getIconHeight(); Insets borderInsets = getShadowBorderInsets(); myCloseButton.setBounds(lpBounds.x + lpBounds.width - iconWidth - borderInsets.right - JBUIScale.scale(8), lpBounds.y + borderInsets.top + JBUIScale.scale(6), iconWidth, iconHeight); }