Resize content of DialogWrapper when its size changes

Hello there,

my plugin shows a DialogWrapper that contains a JPanel (with a LanguageTextField).

When I change the size od the DialogWrapper, the size of JPanel does not change. How can I make it to always fill the whole DialogWrapper?

My DialogWrapper implementation looks like this:

public class EditorWrapper extends DialogWrapper {

    private JPanel panel = new JPanel();

EditorTextField editorTextField;

EditorWrapper(Language language, Project project, String text) {


= new LanguageTextField(language, project, text);
.setPreferredSize(new Dimension(800, 600));



JComponent createCenterPanel() {
        return panel;
1 comment
Comment actions Permalink

I just found out on my own: Adding BorderLayout to my JPanel did the trick.

private JPanel panel = new JPanel(new BorderLayout());

Please sign in to leave a comment.