← Back to team overview

sikuli-driver team mailing list archive

[Question #243428]: Click button in JAVA to start sikuli

 

New question #243428 on Sikuli:
https://answers.launchpad.net/sikuli/+question/243428

I'm programming a Sikuli (thanks much for creating it) app. It has worked great until I wanted to add a button and run the process on a button click.

I'm getting these errors:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalThreadStateException: Cannot call method from the event dispatcher thread
	at java.awt.Robot.checkNotDispatchThread(Unknown Source)
	at java.awt.Robot.waitForIdle(Unknown Source)
	at org.sikuli.script.RobotDesktop.mouseDown(RobotDesktop.java:76)
	at org.sikuli.script.Region._click(Region.java:2320)
	at org.sikuli.script.Region.click(Region.java:2198)
	at com.main.MarvelReboot.RunProcess(MarvelReboot.java:19)
	at com.main.MainProgram$1.ViewChanged(MainProgram.java:39)
	at com.main.MainView.actionPerformed(MainView.java:52)

My problem is I want to click a button and start a process. However, from what I'm reading, it doesn't work with JAVA swing? 

I must be missing something.

Thanks


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.