EditorEx (final EditorEx editor, int rowCount) { editor.setVerticalScrollbarVisible(true); final JTextArea area = new JTextArea(10, 50); area.setRows(rowCount); editor.getComponent().setPreferredSize(area.getPreferredSize()); return editor; }