X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fnet%2Fsf%2Fopenrocket%2Fgui%2Fcomponents%2FDescriptionArea.java;fp=src%2Fnet%2Fsf%2Fopenrocket%2Fgui%2Fcomponents%2FDescriptionArea.java;h=d3d568b2dac9587e7613473f980926a2275ac26f;hb=566a2343c3dfd28e4275d5c17b779a92e8d13f78;hp=ac26ae837d7c01737c9e7c853d0fd8de1e84805d;hpb=d8776d61bfa934a68829d9971bb89311e55c67cf;p=debian%2Fopenrocket diff --git a/src/net/sf/openrocket/gui/components/DescriptionArea.java b/src/net/sf/openrocket/gui/components/DescriptionArea.java index ac26ae83..d3d568b2 100644 --- a/src/net/sf/openrocket/gui/components/DescriptionArea.java +++ b/src/net/sf/openrocket/gui/components/DescriptionArea.java @@ -13,11 +13,15 @@ public class DescriptionArea extends JScrollPane { 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); @@ -41,6 +45,7 @@ public class DescriptionArea extends JScrollPane { this.setPreferredSize(dim); this.setViewportView(editorPane); + this.setText(text); } public void setText(String txt) {