Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deprecated mouseDown mouseUp. How to replace?

1009936May 20 2013 — edited May 21 2013
Hi
I would like to make an automat application which will be responsible for clicking in the point of applet but without clicking. Last time when I was "clicking" in the old version of applet I was using somethink like that:
static Frame f = null;
Component[] c = f.getComponents();
Event e = new Event(c[0],0,c[0]);
c[0].mouseDown(e,20,20);
try {
c[0].mouseUp(e,20,20);
} catch (java.lang.NullPointerException e1) {
System.out.println("wyjątek mouseUp0: NullPointerException");
}
And everythink was working fine. But now, when applet was updated it doesn't work anymore. I suppose that this is because mouseDown is depraceted and I have to use processMouseEvent, but I have problem because processMouseEvent from the type Component is not visible :(
Any idea what can I do?

Edited by: 1006933 on 2013-05-20 11:05

Edited by: 1006933 on 2013-05-20 11:05

Edited by: 1006933 on 2013-05-20 12:06

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 18 2013
Added on May 20 2013
3 comments
2,586 views