Forums Register Login

launch Applet from another program

+Pie Number of slices to send: Send
I want to start an applet "MyApplet" from one of my application.

How do I do that?

Please Help.
+Pie Number of slices to send: Send
What do you mean by "start"? In a browser? In appletviewer? In a window of your -desktop?- application? Something else?
+Pie Number of slices to send: Send
thnx for the reply.

I want to start it in an appletviewer or a window
+Pie Number of slices to send: Send
If you have an HTML file that contains the applet tag, you can start appletviewer using Runtime.exec or the ProcessBuilder class. The HTML file would be a parameter on the command line (just like you'd run appletviewer normally).

If you want it to be part of your application, you can the class that extends applet to a Frame (of JFrame), since Applet extends Panel. Call init(), and then start() and stop() as appropriate. Be aware that you lose some applet features when doing it like this (namely, parameters and the applet context).
+Pie Number of slices to send: Send
thank you.that was great and very clear.
+Pie Number of slices to send: Send
An example would help,please.
+Pie Number of slices to send: Send
An example of what? I mentioned several ways; which one are you pursuing? What do you have so far?
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1039 times.
Similar Threads
Applet and Servlets: Redirecting to Servlet inside an Applet
Please Guide me with this
Display a modal dialog window in an applet
Msg from applet to browser
servlet applet commnication
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:27:07.