1 Reply Latest reply: Feb 21, 2013 1:25 PM by safarmer RSS

    How to call the process method on another applet (in the same package) ?

    991556
      How to call the process method on another applet (in the same package) ?

      I need to call the process method on another applet (in the same package). How i do this ? Do you have a example ?

      Thank you in advance.

      Paul
        • 1. Re: How to call the process method on another applet (in the same package) ?
          safarmer
          You would need a way of getting at the applet instance but that is easy enough. Just store it in a public static field and clear the reference on uninstall.

          Target applet pseudo code:
          class TargetApplet {
            public static Applet INSTANCE;
          
            private TargetApplet() {
            }
          
            public static void install() {
              INSTANCE = new TargetApplet();
              INSTANCE.register();
            }
          }
          Client applet:
          TargetApplet.INSTANCE.process();
          There may also be other (better) ways to do what you are trying to do. This just answers your specific question.

          - Shane