Dear,
I simulate a click on a JButton like this :
if (e.getKeyCode() == 38) {
this.panelControl.getJButtonUp().doClick(1000);
}
I can see the JButton pressed ( thanks to setPressedIcon). But MousePressed see nothing :
public void mousePressed(final MouseEvent e) {
if (e.getComponent().getName().equals("up")) {
buttonPressed = true;
Thread t = new Thread(new Runnable() {
public void run() {
while (buttonPressed) {
JButtonPan tmp = (JButtonPan) e.getSource();
Vector3f v = new Vector3f(0, trans, 0);
tmp.getObj().getTmpTrans().setTransform(move(e, v));
try {
Thread.currentThread().sleep((long) (10 + 100 / lin));
lin++;
} catch (InterruptedException e) {
return;
}
}
}
});
t.start();
}
When i use my mouse, it works, but it doesn't works with doCick(1000). Any idea please ?