Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

detaching an applet from a browser  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to detach an applet from a browser, and need a few listeners and Document objects to stay intact between detaching and attaching. Could somebody please point me to a how to or a comprehensible code sample? Thanks in advance.
Max
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Detatching is not really possible..
In the Applet you could create a new JFrame, this will be shown as a normal JFrame (not in the browser).. on this JFrame you can do all the things you can do on a normal frame...
Closing the browser window will also close the frame...
Good luck!
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try switching to Web Start....do a google on it to find out more. This is java's way of creating a "stand alone" application.
good luck
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can detach it. It's not hard. Here is how I did it:
First, my main applet code/display is actually in a JPanel. This makes it easy to run it as an app, an applet, or a popped out applet. Here is the code that does the poppin in and out. mainPanel is the main JPanel.

Brian
 
I found a beautiful pie. And a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!