private final JEditorPane editorPane;
+
public DescriptionArea(int rows) {
- this(rows, -1);
+ this("", rows, -1);
}
-
public DescriptionArea(int rows, float size) {
+ this("", rows, size);
+ }
+
+ public DescriptionArea(String text, int rows, float size) {
super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
this.setPreferredSize(dim);
this.setViewportView(editorPane);
+ this.setText(text);
}
public void setText(String txt) {