Java Code Examples for javax.swing.JTextArea.addFocusListener()

The following are Jave code examples for showing how to use addFocusListener() of the javax.swing.JTextArea class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenDA   File: Query.java   Source Code and License Vote up 5 votes
public void addTextArea(
        String name,
        String label,
        String theValue,
        Color background) {
    JLabel lbl = new JLabel(label + ": ");
    lbl.setBackground(_background);
    JTextArea textArea = new JTextArea(theValue, _height, _width);
    textArea.setEditable(true);
    textArea.setBackground(background);
    QueryScrollPane textPane = new QueryScrollPane(textArea);
    _addPair(name, lbl, textPane, textPane);
    textArea.addFocusListener(new QueryFocusListener(name));
}
 
Example 2
Project: powertext   File: FocusableTip.java   Source Code and License Vote up 5 votes
public void install(JTextArea textArea) {
	textArea.addCaretListener(this);
	textArea.addComponentListener(this);
	textArea.addFocusListener(this);
	textArea.addKeyListener(this);
	textArea.addMouseListener(this);
	textArea.addMouseMotionListener(this);
}
 
Example 3
Project: OpenJSharp   File: XTextAreaPeer.java   Source Code and License Vote up 5 votes
AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
    super(jt);
    this.xwin = xwin;
    setDoubleBuffered(true);
    jt.addFocusListener(this);
    AWTAccessor.getComponentAccessor().setParent(this,parent);
    setViewportBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
    this.jtext = jt;
    setFocusable(false);
    addNotify();
}
 
Example 4
Project: jdk8u-jdk   File: XTextAreaPeer.java   Source Code and License Vote up 5 votes
AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
    super(jt);
    this.xwin = xwin;
    setDoubleBuffered(true);
    jt.addFocusListener(this);
    AWTAccessor.getComponentAccessor().setParent(this,parent);
    setViewportBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
    this.jtext = jt;
    setFocusable(false);
    addNotify();
}
 
Example 5
Project: openjdk-jdk10   File: XTextAreaPeer.java   Source Code and License Vote up 5 votes
AWTTextPane(JTextArea jt, XWindow xwin, Container parent) {
    super(jt);
    this.xwin = xwin;
    setDoubleBuffered(true);
    jt.addFocusListener(this);
    AWTAccessor.getComponentAccessor().setParent(this,parent);
    setViewportBorder(new BevelBorder(false,SystemColor.controlDkShadow,SystemColor.controlLtHighlight) );
    this.jtext = jt;
    setFocusable(false);
    addNotify();
}