aspose file tools*
The moose likes Applets and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark ""Popping" an applet out of the page" Watch ""Popping" an applet out of the page" New topic
Author

"Popping" an applet out of the page

Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
Is there a way to give the user of an applet the option to display the applet outside of the browser window? I'm pretty sure I have seen this done before and when popped out the applet area in the browser says something like "This applet is being displayed in a separate window" or something like that. The reason I ask is that the user may want to display the applet in a frame that is bigger than the applet tag is allowing. I'd like to show the applet in the webpage, but offer them a button that will "pop" it into its own frame. (yes, I know WebStart is a possible solution, but it's not an option for me)
I think this should be fairly easy for me since my main component is a JPanel that is simply added to the applet.
Hmmm. I just checked and and in my init() method in the JApplet, I create the main JPanel and add it to my JApplet. It looks like I should be able to also creat a new button and when pressed, create a JFrame and remove the panel from the applet, and add it to the JFrame. Guess i'll give that a try.
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>
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
In case anybody was wondering, that worked
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Cool. Thanks for letting us know how you got on.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
jQuery in Action, 2nd edition
 
subject: "Popping" an applet out of the page