JComponent () { JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createEtchedBorder()); panel.setLayout(new BorderLayout()); JPanel cbPanel = new JPanel(new BorderLayout()); cbPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 10, 10)); myShowInFutureCheckBox = new JCheckBox(); myShowInFutureCheckBox.setText(JavaRefactoringBundle.message("do.not.show.this.message.in.the.future")); panel.add(cbPanel, BorderLayout.SOUTH); cbPanel.add(myShowInFutureCheckBox, BorderLayout.WEST); JPanel textPanel = new JPanel(new BorderLayout()); textPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panel.add(textPanel, BorderLayout.CENTER); myTextArea = new JTextArea(myText); textPanel.add(myTextArea, BorderLayout.CENTER); myTextArea.setEditable(false); myTextArea.setBackground(UIUtil.getPanelBackground()); Font font = myShowInFutureCheckBox.getFont(); font = new Font(font.getName(), font.getStyle(), font.getSize() + 1); myTextArea.setFont(font); myShowInFutureCheckBox.setFont(font); isToShowInFuture = true; myShowInFutureCheckBox.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent event) { isToShowInFuture = !myShowInFutureCheckBox.isSelected(); } } ); return panel; }