Example usage for javax.swing JTextArea addFocusListener

List of usage examples for javax.swing JTextArea addFocusListener

Introduction

In this page you can find the example usage for javax.swing JTextArea addFocusListener.

Prototype

public synchronized void addFocusListener(FocusListener l) 

Source Link

Document

Adds the specified focus listener to receive focus events from this component when this component gains input focus.

Usage

From source file:com.att.aro.ui.view.menu.tools.RegexWizard.java

private JTextArea createTextAreaAndProperties(String title) {
    JTextArea textArea = new JTextArea();
    textArea.setLineWrap(true);/*from w ww . j ava  2  s . com*/
    TitledBorder ttlBorder = BorderFactory.createTitledBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createRaisedBevelBorder(), BorderFactory.createLoweredBevelBorder()), title);
    ttlBorder.setTitleColor(Color.BLUE);
    ttlBorder.setTitleFont(ttlBorder.getTitleFont().deriveFont(Font.BOLD));
    textArea.setBorder(ttlBorder);
    textArea.addFocusListener(this);
    return textArea;
}