/** * Turn on the mechanism to read mouse events. * * <p>This mechanism is normally turned off when the console is open. * * <p>To read mouse events should be called the getMouseEvent method. * * @param drag True to enable also the mouse drags * @see #getMouseEvent() * @see #disableMouseEvents() * @see #waitKeyPressed(long) * @see #getKeyPressed() */ public static void enableMouseEvents(boolean drag) { frame.enableMouseEvents(drag); }