Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Java Applet Attach/Detach
Normally I code in C/C++, but I've recently started Java. One of the things I'm trying is to make an applet for a web page that does the following:
1.) Starts out embedded like a normal applet.
2.) If the user clicks on a menu/button/whatever designed to let them "detach" the applet and place it into a new window, this should happen. The space where the applet was should probably hide/disable the current functionality and pass this all to the new window.
3.) If the user closes the new window or clicks on a menu/button/whatever designed to let them "attach" the applet, it will return to the web browser and the window would close/hide.
Obviously, the "state" of all the components should be kept. I don't just want to make a "new" window, I want to make a copy of it, but only allow one to be active at any given time.
Two examples of something similar in functionality to what I'm trying, although the applications have little in common with what I'm working on:http://www.mudconnect.com/java/Telnet/http://dogfeathers.com/java/hyperslice.html
Despite some searching and some trial and error of my own, I've been unable to get this right, though I feel like it's something that should be fairly simple.
Any suggestions or advice would be appreciated.