Example usage for javax.swing.text JTextComponent addInputMethodListener

List of usage examples for javax.swing.text JTextComponent addInputMethodListener

Introduction

In this page you can find the example usage for javax.swing.text JTextComponent addInputMethodListener.

Prototype

public void addInputMethodListener(InputMethodListener l) 

Source Link

Usage

From source file:Main.java

private static void addJTextComponentListeners(JTextComponent c, Object... objs) {
    if (c == null)
        return;/* w ww.j  a v a 2s .c o  m*/
    addJContainerListeners(c, objs);
    CaretListener caretListener = search(objs, CaretListener.class);
    InputMethodListener inputMethodListener = search(objs, InputMethodListener.class);
    if (caretListener != null)
        c.addCaretListener(caretListener);
    if (inputMethodListener != null)
        c.addInputMethodListener(inputMethodListener);
}