Frame to parent command
Posted on 1997-03-07
If I have an applet that spawns an external frame and I want
that frame to call a method of the applet, what do I do?
(In particular, I'm working on a navigation tool for my site. The applet will reside in one frame (in the HTML sense of frame) and the pages of the site in another. The applet will spawn an external window (Java frame) that has buttons that can be pressed or somesuch, so that the other frame(HTML) will display a new document at the touch of a button in the free floating Java frame. So I have a method in the applet that will "getAppletContext()" and "showDocument()". I want the window (Java frame) that the applet spawns, to contain buttons such that when pressed the frame will cause the method to be called with some URL as a parameter. (For instance, if the user presses the button "Home", the "changePage(URL u)" method that I've written will be called, with the URL of the first page of my website as a parameter.))