All pastes #28007 Raw Edit

Untitled

public text v1 · immutable
#28007 ·published 2005-11-08 17:05 UTC
rendered paste body
import org.gnu.gtk.Gtk;
import org.gnu.gtk.TextView;
import org.gnu.gtk.Window;
import org.gnu.gtk.WindowType;
import org.gnu.gtk.event.MouseMotionEvent;
import org.gnu.gtk.event.MouseMotionListener;

public class MouseMotionTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Gtk.init(args);
		
		Window win = new Window(WindowType.TOPLEVEL);
		win.setMinimumSize(640,480);
		
		TextView b = new TextView();
		win.add(b);
		
		b.addListener(new MouseMotionListener() {
		
			public boolean mouseMotionEvent(MouseMotionEvent arg0) {
				System.out.println("("+arg0.getX()+","+arg0.getY()+")");
				return false;
			}
		
		});
		
		win.showAll();
		
		Gtk.main();
	}

}