Example #1
0
  /** Creates the text area. */
  private void initTextArea() {
    textArea.setOpaque(false);
    textArea.setEditable(false);
    StyledDocument doc = textArea.getStyledDocument();

    MutableAttributeSet standard = new SimpleAttributeSet();
    StyleConstants.setAlignment(standard, StyleConstants.ALIGN_CENTER);
    StyleConstants.setFontFamily(standard, textArea.getFont().getFamily());
    StyleConstants.setFontSize(standard, 12);
    doc.setParagraphAttributes(0, 0, standard, true);

    parentWindow.addSearchFieldListener(this);
  }