I was wondering if it was possible to trigger HTML using a JButton. Here is what I mean. I have 2 frames in my HTML and in Frame 1 I have an applet loaded that is a series of JButtons. When I press one of those buttons, I want to load a web page inside of Frame 2. I know I can do this with standard HTML forms, but I would like to know if you can do it using an Applet and JButtons. If this needs to be moved to the HTML forum, please move it. Thanks.
posted 15 years ago
Hi Greg, You can achieve this using the AppletContext, meaning that you can ask the browser that runs the applet to do it for u. Here is a sample code : AppletContext theAppletContext = theApplet.getAppletContext(); theAppletContext.showDocument(documentURL, targetFrame); Regards