This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet Opening new html window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "Applet Opening new html window" Watch "Applet Opening new html window" New topic
Author

Applet Opening new html window

Denny Ong
Greenhorn

Joined: Jan 15, 2004
Posts: 1
Hi, how can I open a new browser window from clicking a button in the applet?
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
If you want to keep your applet running and launch the URL in a new browser window, you can use this:
appletContext.showDocument(new URL(destURL), "_blank");
where appletContext is your AppletContext
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
David Vickers
Greenhorn

Joined: Oct 02, 2003
Posts: 13
Hi, I do the above, and it works fine, but is there a way to monitor when the new page is closed, and also can it be set to not have buttons, status etc, like a frame.
I know you can use window.open(x,y,etc,etc) to set this up as a javascript call, but can it been done from an applet. alternative, can the 'window' remove the buttons, as it can resize with window.resizeTo(x,y).
Cheers
 
GeeCON Prague 2014
 
subject: Applet Opening new html window