Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By Norm

Thread: how to pass the info to another applet?

  1. #1
    nananya is offline Member
    Join Date
    Dec 2011
    Posts
    20
    Rep Power
    0

    Default how to pass the info to another applet?

    Hmm...I am having 3 applet,all save in different class.
    and i use a html with frame to split it into 3 part,so,each of the part show one of the applet.
    I wan to make it like i click a button on Applet A,then applet B will come out another button.
    Is it possible to do that?
    OR save the info on the html and the other 2 applet can receive it...
    Thanks.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: how to pass the info to another applet?

    Not sure what security will do with this.
    Have you tried any of the methods in the ApplecContext class?

  3. #3
    nananya is offline Member
    Join Date
    Dec 2011
    Posts
    20
    Rep Power
    0

    Default Re: how to pass the info to another applet?

    no i didn't try any method yet.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: how to pass the info to another applet?

    Try some of them and see what happens.

  5. #5
    nananya is offline Member
    Join Date
    Dec 2011
    Posts
    20
    Rep Power
    0

    Default Re: how to pass the info to another applet?

    Hmm...now bacause there is some problem on my computer so i try it using my friends one...but it give me this in result:
    Warning: Can't read AppletViewer properties file: C:\Users\<username>
    \.hotjava\properties Using defaults.
    java.lang.UnsupportedClassVersionError: label : Unsupported major.minor version
    51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader. java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :615)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:14
    1)
    at sun.applet.AppletClassLoader.findClass(AppletClass Loader.java:209)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at sun.applet.AppletClassLoader.loadClass(AppletClass Loader.java:144)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
    at sun.applet.AppletClassLoader.loadCode(AppletClassL oader.java:654)
    at sun.applet.AppletPanel.createApplet(AppletPanel.ja va:785)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java: 714)
    at sun.applet.AppletPanel.run(AppletPanel.java:368)
    at java.lang.Thread.run(Thread.java:662)
    what is this? and how should i fix this problem?
    I had download and installed jdk1.6.0_29 on my friend's computer already!
    I think this one is much more serious problem...

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: how to pass the info to another applet?

    UnsupportedClassVersionError: label : Unsupported major.minor version 51.0
    The code was compiled with a younger version of java (1.7). The appletviewer is from an older version (1.6?)
    Recompile the code with the same version of java as the appletviewer you are using.
    nananya likes this.

  7. #7
    nananya is offline Member
    Join Date
    Dec 2011
    Posts
    20
    Rep Power
    0

    Default Re: how to pass the info to another applet?

    oh,it work!Thanks~!
    Beside that i think there is nothing can use in appletContext...getAudio,getVideo...but nothing is about getting a string...i only need a string...

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: how to pass the info to another applet?

    Get a reference to the other Applet object and call one of its methods.

Similar Threads

  1. How to pass a javascript function into APPLET PARAM
    By Ambergahill in forum Java Applets
    Replies: 0
    Last Post: 11-28-2010, 04:57 PM
  2. Getting info from a GUI
    By waysgoose in forum New To Java
    Replies: 1
    Last Post: 10-16-2010, 01:03 PM
  3. Jframe pass variable to Applet
    By wayn in forum AWT / Swing
    Replies: 0
    Last Post: 03-10-2010, 09:54 AM
  4. Replies: 2
    Last Post: 09-29-2009, 03:33 PM
  5. How to pass an html variable as an applet value
    By fred in forum Java Applets
    Replies: 1
    Last Post: 08-06-2007, 03:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •