Don't throw exceptions on Mouse.getEventButtonState

This commit is contained in:
Elias Naur 2006-08-31 13:35:36 +00:00
parent 7f9faf144d
commit ec4a94d47d
1 changed files with 1 additions and 4 deletions

View File

@ -394,13 +394,10 @@ public class Mouse {
} }
/** /**
* Get the current events button state. If <code>getEventButton()</code> is -1, * Get the current events button state.
* and IllegalStateException is thrown.
* @return Current events button state. * @return Current events button state.
*/ */
public static boolean getEventButtonState() { public static boolean getEventButtonState() {
if (eventButton == -1)
throw new IllegalStateException("Current event has no button state change");
return eventState; return eventState;
} }