3 Replies Latest reply: May 21, 2013 7:09 AM by EJP RSS

    Deprecated mouseDown mouseUp. How to replace?

    1009936
      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