JComponent () { JPanel parentPanel = new JPanel(new BorderLayout()); final JPanel labelPanel = new JPanel(new GridBagLayout()); final JLabel label1 = new JLabel(SvnBundle.message("svn.edit.commit.message.attention")); parentPanel.setMinimumSize(new Dimension(label1.getPreferredSize().width + 50, 150)); final GridBagConstraints gb = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, JBUI.insets(1), 0, 0); label1.setFont(label1.getFont().deriveFont(Font.BOLD)); labelPanel.add(label1, gb); ++ gb.gridy; gb.insets.top = 5; gb.insets.bottom = 3; final JLabel label2 = new JLabel(SvnBundle.message("svn.edit.commit.message.prompt")); labelPanel.add(label2, gb); final JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(labelPanel, BorderLayout.WEST); parentPanel.add(wrapper, BorderLayout.NORTH); myCommitMessage = new CommitMessage(myProject, false, true, true); Disposer.register(getDisposable(), myCommitMessage); myCommitMessage.setText(myOldText); parentPanel.add(myCommitMessage, BorderLayout.CENTER); return parentPanel; }