Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

click button in applet -> go to new applet.

  • 16-11-2011 10:55PM
    #1
    Registered Users, Registered Users 2 Posts: 862 ✭✭✭


    Hi.
    I'm new to Java, and I have created an AWT applet form with a submit button (among other things). When I click this submit button I want to go to another applet I have. Here's the action code for hitting the button....

    private void button1ActionPerformed(java.awt.event.ActionEvent evt) {
    }

    I'm not quite sure what to add in there. The name of my other applet is GuestApplet.class. How do I launch this when I click the submit button?

    Further to this, as well as going to the new applet, can I pass some variables to it? Put simply, the user will have input some data on the first page - I want this data passed to GuestApplet.class when they hit submit

    Thanks in advance


Comments

  • Registered Users, Registered Users 2, Paid Member Posts: 2,032 ✭✭✭lynchie


    Check out the javadocs for AppletContext. There is a method there to ask the browser to change document though browsers are free to ignore the request.

    You can pass arguments to your second applet using a query string in the redirect and pass them in using the standard <param/> tags


  • Registered Users, Registered Users 2 Posts: 862 ✭✭✭kelbal


    thanks, I'll check this out


Advertisement