Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

click button in applet -> go to new applet.

Options
  • 16-11-2011 10:55pm
    #1
    Registered Users Posts: 839 ✭✭✭


    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 Posts: 1,994 ✭✭✭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 Posts: 839 ✭✭✭kelbal


    thanks, I'll check this out


Advertisement