Example usage for javax.swing JTextField addMouseMotionListener

List of usage examples for javax.swing JTextField addMouseMotionListener

Introduction

In this page you can find the example usage for javax.swing JTextField addMouseMotionListener.

Prototype

public synchronized void addMouseMotionListener(MouseMotionListener l) 

Source Link

Document

Adds the specified mouse motion listener to receive mouse motion events from this component.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    JTextField component = new JTextField();
    component.addMouseMotionListener(new MyMouseMotionListener());
    JFrame f = new JFrame();

    f.add(component);/*w  w  w  . j  av  a2 s  . c  o m*/
    f.setSize(300, 300);
    f.setVisible(true);

}