JComponent () { JPanel previewHeaderPanel = new JPanel(); previewHeaderPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); JLabel warningLabel = new JLabel(EditorConfigBundle.message("editor.preview.not.saved.warning")); warningLabel.setForeground(JBColor.GRAY); previewHeaderPanel.add(warningLabel); previewHeaderPanel.setBorder(IdeBorderFactory.createBorder()); return previewHeaderPanel; }