JComponent () { EditorEmptyTextPainter painter = ApplicationManager.getApplication().getService(EditorEmptyTextPainter.class); JBPanelWithEmptyText panel = new JBPanelWithEmptyText() { @Override protected void paintComponent(Graphics g) { super.paintComponent(g); painter.paintEmptyText(this, g); } @Override public Color getBackground() { return getIdeBackgroundColor(); } @Override public boolean isOpaque() { return true; } }; panel.getEmptyText().clear(); return panel; }