This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,784 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

Deprecated mouseDown mouseUp. How to replace?

1009936
1009936 Member Posts: 2
edited May 21, 2013 8:09AM in Abstract Window Toolkit (AWT)
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

Answers

This discussion has been closed.