Open an applet inside a JFrame?

Hi all!

I know this subject is kind of covered in previous topics, but my situation here is a little different.

I have a TRENDnet TV-IP100 Internet Camera that uses a Java-Applet to show in a browser window the video it captures, using an xview.class file.

I built a swing application that extends JFrame and I want to open in a JPanel, inside the JFrame, the applet-class that my camera uses.

My problem is that I can't take and decompile that class file from the camera, in order to compile from the scratch the Applet; some could say illegal.

So, I wonder if there is a way to open the class file inside my JFrame application. Also, I want to know if I can pass argumets in the JFrame file, like PARAM, NAME, VALUE, as there are important to start the applet.

Thank you all, in advance.

John_Astralidis.

[856 byte] By [John_Astralidisa] at [2007-10-2 21:45:35]
# 1

I have not tried this but if the Applet or JApplet class is to be used only as far as a component in a Container (JFrame.getContentPane() returns a Container) I see no problem with explicitly casting into a Panel or even a Container

Panel p=(Panel)theAppletInstance;

this.getContentPane().add(p);//this being the JFrame;

There be problem of which I have not considered as the applet class is 'different' to many classes.

Bamkin

-

Message was edited by:

bamkin-ov-lesta

-

Container and Panel examples were used as Applet is derived from Panel, which is derived from Containter

bamkin-ov-lestaa at 2007-7-14 1:01:09 > top of Java-index,Desktop,Core GUI APIs...
# 2
Yes, but as I mentioned I don't have the applet class, as it is in camera's OS. Using the code you suggested me would require having the applet-class file.Anyway thank you.John.
John_Astralidisa at 2007-7-14 1:01:09 > top of Java-index,Desktop,Core GUI APIs...
# 3
hi!then i think u can use the URLClassloader class. but in that also u have to know the init class name.this was according to my understanding, excuse me if i am wrongAniruddha
Aniruddha-Herea at 2007-7-14 1:01:09 > top of Java-index,Desktop,Core GUI APIs...
# 4
No, man! You are right.But, it crossed my mind a different perspective of how dealing with this and I would be grateful of you if you posted your reply in my new thread with topic: "how to make a java browser to execute java-applets".Thank you.Regards, John.
John_Astralidisa at 2007-7-14 1:01:09 > top of Java-index,Desktop,Core GUI APIs...
# 5
Please, I would like to know if there is a way to make a web-browser in java that loads applets too.I would be grateful of you if you have any idea and let me know.Thank you.John.
John_Astralidisa at 2007-7-14 1:01:09 > top of Java-index,Desktop,Core GUI APIs...