I have an applet and a frame in it. I want this frame to be opened when applet is launched.
public class MyApplet extends JApplet {
    public void init() {
        Frame frame = new JFrame("myframe");
        frame.setVisible(true);
        frame.toFront();
    }
}
This doesn't work. Browser window is on top whereas frame is hidden.
Tried all that was written in How to bring a window to the front?