JComponent () { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10)); Icon icon = Messages.getQuestionIcon(); JLabel iconLabel = new JLabel(icon); panel.add(iconLabel, BorderLayout.WEST); JLabel label = new JLabel(getMessage()); label.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 10)); label.setForeground(JBColor.foreground()); panel.add(label, BorderLayout.CENTER); return panel; }