void (Graphics g) { if (g instanceof Graphics2D g2) { int x = (getWidth() - myNoEmojiFoundImage.getWidth(this)) / 2; int y = (getHeight() - myNoEmojiFoundImage.getHeight(this)) / 2; final Composite saveComposite = g2.getComposite(); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, 0.5F)); StartupUiUtil.drawImage(g, myNoEmojiFoundImage, x, y, null); g2.setComposite(saveComposite); } g.setColor(myStyle.myNoEmojiFoundTextColor); g.setFont(myStyle.myFont); @Nls String message = EmojipickerBundle.message("message.EmojiPicker.NoEmojiFound"); int x = (getWidth() - g.getFontMetrics().stringWidth(message)) / 2; int y = (getHeight() + myNoEmojiFoundImage.getHeight(this)) / 2 + JBUIScale.scale(25); g.drawString(message, x, y); }