void (PromoAction promoAction, Color panelBackground, Border eastBorder, Color groupFg, IconCompOptionalCompPanel<SimpleColoredComponent> panel) { SimpleColoredComponent promo = new SimpleColoredComponent(); promo.setBackground(panelBackground); promo.setForeground(groupFg); promo.setIcon(AllIcons.Ide.External_link_arrow); promo.setIconOnTheRight(true); promo.setTransparentIconBackground(true); promo.append(IdeBundle.message("plugin.advertiser.product.call.to.action", promoAction.getPromotedProductTitle(), promoAction.getCallToAction())); SimpleColoredComponent upgradeTo = new SimpleColoredComponent(); upgradeTo.setIcon(promoAction.getPromotedProductIcon()); upgradeTo.setBackground(panelBackground); upgradeTo.setForeground(groupFg); upgradeTo.setIconOnTheRight(true); upgradeTo.append(FeaturePromoBundle.message("get.prefix")); upgradeTo.setTransparentIconBackground(true); BorderLayoutPanel compositeUpgradeHint = JBUI.Panels.simplePanel(promo) .addToLeft(upgradeTo) .andTransparent(); compositeUpgradeHint.setBorder(eastBorder); panel.setRight(compositeUpgradeHint); }