Skip to main content

7b52 can't create java.awt.Robot

1 reply [Last post]
mbien
Offline
Joined: 2007-04-29
Points: 0

tested 7b52 on ubuntu and got this exception (mouse is a logitech revolution):

<br />
package test;</p>
<p>import java.awt.AWTException;<br />
import java.awt.Robot;<br />
import java.util.logging.Level;<br />
import java.util.logging.Logger;</p>
<p>/* start with jdk 7b52 (tested only on linux)</p>
<p>Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: button doesn't exist 12<br />
        at java.awt.event.InputEvent.getMaskForButton(InputEvent.java:233)<br />
        at java.awt.Robot.(Robot.java:101)<br />
        at test.RobotTest$1.run(RobotTest.java:30)<br />
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:235)<br />
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:603)<br />
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)<br />
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)<br />
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)<br />
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)<br />
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)<br />
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)<br />
 */</p>
<p>public class RobotTest {<br />
    public static void main(String args[]) {<br />
        java.awt.EventQueue.invokeLater(new Runnable() {<br />
            public void run() {<br />
                try {<br />
                    new Robot();<br />
                } catch (AWTException ex) {<br />
                    Logger.getLogger(RobotTest.class.getName()).log(Level.SEVERE, null, ex);<br />
                }<br />
            }<br />
        });<br />
    }<br />
}<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anthony_p
Offline
Joined: 2006-07-24
Points: 0