We are making an emulator for disabled persons. There is a desktop area in this app which we are testing at the moment. How can I programmatically generate 1 mouse click and immediately after it 1 keyboard click? Time between clicks is 100 ms.
EDIT
This is the code from your suggestions.
import java.awt.Robot;
import java.io.Console;
import javax.swing.Timer;
public class Start {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Timer timer = new Timer(100, new ActionListener() {
private final Robot robot = new Robot();
public void actionPerformed(ActionEvent evt) {
robot.mousePress(1);
robot.mouseRelease(1);
robot.keyPress(KeyEvent.VK_A);
robot.mouseMove(55, 145);
}
});
}
}
There are 5 errors which are shown in the snapshot.

Take a look at the
Robotclass, which can be used to programmatically generate mouse clicks and keyboard strokes. You could use this in conjunction with the SwingTimerclass to periodically generate these events; e.g.