/** * Constructs a new component with the label displaying the passed text. * * @param pLabel * The text to display in the label. * @param docModel the document for the text area */ public JLabeledTextArea(String pLabel, Document docModel) { super(); mTextArea = new JTextArea(); mLabel = new JLabel(pLabel); init(); if (docModel != null) { mTextArea.setDocument(docModel); } }