List of usage examples for java.awt Toolkit removeAWTEventListener
public void removeAWTEventListener(AWTEventListener listener)
From source file:net.sourceforge.squirrel_sql.fw.gui.debug.DebugEventListener.java
public void setEnabled(boolean enable) { Toolkit kit = Toolkit.getDefaultToolkit(); if (enable) { /* register as a listener for mouse events */ kit.addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); /* show all tooltips for ten seconds before hiding */ ToolTipManager.sharedInstance().setDismissDelay(10000); } else {/* w w w. ja v a2s .c o m*/ kit.removeAWTEventListener(this); } }