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.

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

Similar Messages

  • How To open applet inside AWT Frame

    Hi there !
    I want to open my applet directly inside a AWT Frame window from a hyper link...
    That is when a user clicks a hyper link i want to open my applet inside a AWT Frame...I do not want my applet to be opened inside a browser window is there any possibility to do this ...pls help me
    -Priya

    hi,
    i see one way, but i really do not know it works or not.
    Try the following:
    An applet is nothing more then a panel. So you can intanciate the applet:Class class1=new Class.forName(nameOfApplet);
    Applet a=(Applet)class1.newInstance(//maybe a parameter);
    frame.add(a);
    a.init(); //calling the init-method of the appletJust try, but I really can't commit you the workability.
    regards

  • Opening an applet from a java desktop application

    I have an applet and I've seen some fairly complicated methods (for me) of making the main class hybrid and open as both an applet and an application. Isn't there a simple way o having a class with a main method to open the applet class in an applet viewer or maybe the browser? Then I could compile it and run the same jar file as both an application and an applet. What is the simplest way you can think of to do this?

    The simplest was is to put all that GUI stuff into a JPanel, and not a JFrame or JApplet. That way, you can embed it in anything you like.

  • Viewing JavaDoc HTML files inside a JFrame

    hi all,
    how can I display any of JavaDoc HTML files (as overview-summary.html or index.html) inside a JFrame?
    in addition, the user should be able to use hyperlinks.
    I used JEditorPane, but in it I can't use hyperlinks.
    thanks for your answers. :)

    Hey thats something like a bew browser right if you want to i can send you an example for you but i'm curious you want to use JFileChooser or just open the html page like internet and provide links however send me a message to [email protected] to send you the example and watch if it works for you

  • Why the IE cannot open the Applet build by Swing

    Halo, i build a GUI inside an Applet, by using the Java Swing. althoug i have
    installed the Java plug in, and use the HTML converter, but when i try to use the internet explorer to open this applet, the exception is thrown, and it said the
    "Start: didnt initialize the applet" in the IE window.
    and this is the error message shown in the the Java Console:
    java.security.AccessControlException: access denied (java.io.FilePermission anny.gif read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
         at sun.awt.SunToolkit.getImage(Unknown Source)
         at javax.swing.ImageIcon.<init>(Unknown Source)
         at javax.swing.ImageIcon.<init>(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Anyone can help me in this problem? thank you very much

    the image saved with the class file of the applet, and this applet i will
    paste in the server, it is funny when i cut all the codes about the imageicons,
    then the IE can load the applet and show it ,
    and now i use the xx = new ImageIcon("xxx.gif"); to construct an imageicon in the java code of that applet,but it got the problem
    i want to konw whether can use xxx = new ImageIcon(url) will help me to solve this problem, and if it can, how format the url is, for example, the IP of my server is 172.20.54.152, and the image anny.jpg saved in C:/Javaprogram,
    can u tell me what is the solution.
    Thank you very much

  • Browser crashes when trying to open 2 applets in 2 browser windows-

    i am having this weird problem, on windows XP, if i open a applet in IE or firefox browser and then open a new browser window and try to open another applet in that windows, the browser simply crashes with no error message or anything,
    For example
    if i click on link below and then when this applet is loaded i open a new browser window and try to open other applet from the link the new opened window closes.
    can some one try this on there PC and let me know if it happens there, and what might be the issue?
    [http://www.realapplets.com/applets/quizmaster/]
    [http://www.realapplets.com/applets/secretpass/]

    Open the Console app in Applications>Utilities and look for log entries at the time of the problem and post them here

  • Ios7 bookamrking web application to home screen via Safari crashes after login and when we try to open any link inside. Can anyone please tell me if there is any scheduled fix for this bug in safari?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

  • How to open a pdf file in JFrame

    hi to all,
    i need to know how to open a pdf file in JFrame. Help is needed with this would grateful, and i used the code state below..
    InputStream in=this.getClass().getResourceAsStream("/images/help1.pdf");
    Process p = Runtime.getRuntime().exec(in);Thanks in Advance...

    this is the error which i'm getting while executing the code
    init:
    deps-jar:
    Compiling 1 source file to /home/VEL AREA/SampleApplication/build/classes
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:3: package com.sun.pdfview does not exist
    import com.sun.pdfview.PDFFile;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:4: package com.sun.pdfview does not exist
    import com.sun.pdfview.PDFPage;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:5: package com.sun.pdfview does not exist
    import com.sun.pdfview.PagePanel;
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:25: cannot find symbol
    symbol : class PagePanel
    location: class sampleapplication.Main
    PagePanel panel = new PagePanel();
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:25: cannot find symbol
    symbol : class PagePanel
    location: class sampleapplication.Main
    PagePanel panel = new PagePanel();
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:36: cannot find symbol
    symbol : class PDFFile
    location: class sampleapplication.Main
    PDFFile pdffile = new PDFFile(buf);
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:36: cannot find symbol
    symbol : class PDFFile
    location: class sampleapplication.Main
    PDFFile pdffile = new PDFFile(buf);
    /home/VEL AREA/SampleApplication/src/sampleapplication/Main.java:39: cannot find symbol
    symbol : class PDFPage
    location: class sampleapplication.Main
    PDFPage page = pdffile.getPage(0);
    8 errors
    BUILD FAILED (total time: 2 seconds)
    for the reply #4..

  • 2 Problems - Can't open a PDF inside IE 8, can't open a link in a PDF

    I am running Vista Business on a Lenovo ThinkCentre with dual core Intel processor, 2 GB RAM. I have 2 problems with Reader 9.3.0.
    First it will not open a PDF inside IE 8. Instead it opens the PDF in a new Reader window. It does open a PDF inside Firefox. In Edit|Preferences|Internet the Display PDF in browser checkbox is checked. In IE 8 Tools|Manage Add-ons|Run without permission Adobe PDF Reader is Enabled.
    The second problem is that I cannot open a link in a PDF file. When I place the cursor over an e-mail or internet link in a PDF file the little hand appears. However when I click on the link nothing at all happens.
    Does anyone have any suggestions on how to fix either of these problems?
    Ira B.

    In the replies I have been receiving, nobody has said which problem of the
    two I wrote about they are experiencing. I assume that all are using Vista
    (I use Vista business) since neither of these problems appear on my machine
    that runs XP Pro.
    I have managed to get around these problems and am happy to share my
    experiences with all, but I advise not getting too excited since my solution
    may not be exactly what others might want. Of the two problems, the one
    where I was unable to open an e-mail or web link in Acrobat Reader was the
    more serious for me. I edit a couple of newsletters that almost always
    contain some of these links and I need to be able to test them to make sure
    they are correct before I send out a newsletter.
    I found out that if I used Foxit Reader in place of Acrobat Reader I was
    able to open all links with no problems. For a while I had both readers
    installed with both able to open PDFs in IE8 but only Foxit able to open
    links in a PDF file. Then Foxit Reader began to exhibit the problem of PDFs
    not opening in an IE8 browser window. Then the problem spread to Acrobat
    reader. I have no idea as to the cause.
    I tried removing and re-installing both Readers but was unable to rid myself
    of the problem. I then contacted Foxit support for some assistance. Yes,
    unlike Adobe, they actually try to help if you are having a problem with
    Foxit Reader. Foxit support gave me a procedure to try but it did not work
    at first. I finally found out that I had to install Foxit Reader with User
    Access Control (UAC) shut off in Vista. If UAC was not shut off, Foxit's
    addin for IE8 would not install properly. Then I re-enabled UAC and followed
    the procedure Foxit support suggested which is:
    1. Login your machine with admin account, right click on > FoxitReader.exe
    2. Select "Properties"
    3. Select "Compatibility" tab
    4. Uncheck "Run this program as an administrator" under "Privilege Level"
    5. Select "Show settings for all users"
    6. Click on "Continue" if there is a prompt.
    7. Uncheck "Run this program as an administrator" under "Privilege Level".
    (This was already unchecked in my case.)
    After this Foxit Reader opened PDF files in browser windows in both IE8 and
    Firefox.
    I think that this procedure might work for Acrobat Reader; at least I think
    it might be worth a try. I don't want to try it myself because my computer
    is working just fine right now with Foxit Reader and I don't want to take
    the chance of screwing it up since it was so difficult for me to get to this
    point.
    If someone would like to try it, I suggest removing Acrobat Reader, then
    disabling UAC and re-installing Acrobat Reader. Then enable UAC again. Then
    follow the 7 steps above for AcroRd32.exe. I am hopeful, but by no means
    certain, that then PDF files will open in an IE8 browser window. I would
    appreciate it that, if anyone tries this, they would let me know their
    results. I regret not being able to provide a more definitive solution.
    irablum1

  • Opening html files inside jar

    Hi,
    I'm making a program where i have a set of help files in the form of html and i would like to open them when the user clicks the "Help" button and I used this code at first
    try
         Desktop.getDesktop().browse(new URI("resources/html/help.html"));
    catch (Exception ex)
         JOptionPane.showMessageDialog(null, "Could not open help.html in default browser\n", "Error", JOptionPane.ERROR_MESSAGE);
    }However after I made the jar and tried to execute on another computer however, it wouldn't work and would display the error message. I was wondering if there was some way that I could open the help.html in their default browser, or maybe a frame if that works, from the jar and have my program still be platform independent?

    ok so i just realized that it doesn't make sense for a program outside the jar, like IE or Firefox, to be able to access and open a file inside of the jar. I am now looking for suggestions on how to work around this problem for my program to be able to have a simple help system located inside the jar that can be loaded during runtime.
    Thanks for your suggestions.

  • Opening a PDF inside Flash compile errors

    I'm trying to open a pdf inside flash.  I followed a tutorial online but I'm have issues with the compiler.  Here's my code:
    import flash.html.HTMLLoader;
    import flash.html.HTMLPDFCapability;
    import flash.html.HTMLWindowCreateOptions;
    if( HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK )
        var htmlLoader:HTMLLoader = new HTMLLoader();
        var url:URLRequest = new URLRequest( "01_Advanta2_Master.pdf" );
        htmlLoader.width = 800;
        htmlLoader.height = 600;
        htmlLoader.load( url );
    var pdfHolder:UIComponent = new UIComponent();
    pdfHolder.addChild (htmlLoader);
        addChild (pdfHolder);
    It results in these errors:
    1046: Type was not found or was not a compile-time constant: UIComponent.
    1180: Call to a possibly undefined method UIComponent.
    I've tried to import fl.core.UIComponents in the beginning but that resulted in this error:
    1172: Definition fl.core:UIComponent could not be found.
    Any help would be greatly appreciated.

    You need to have components in the library in order for them to be accessible.

  • How to open an Applet from a text link in a HTML Page

    Hi There
    How to open an Applet from a text link
    in a HTML page
    For example I have a HyperLink "Open Applet"
    When a user clicks that link i want to open a
    Applet in a AWT Window.
    How can i do this
    Will any one help me?
    -Ramya

    u can use javascript for that
    <SCRIPT language="javascript">
    function loadAppNow() {
    document.write("<APPLET ......></APPLET>")
    </SCRIPT>
    LoadApplet
    this will overwrite the applet on current window
    There are many good ways other than document.write to open in same window. I don't remember the syntax right now.
    Plz. refer to javascript tutorial for that.
    even you can insert the applet while retaining previous contents. its quite easy actually.
    regards....bhart

  • I can't export my video which contains only photos, sound tracks nor play it in fullscreen iMovie it shuts down. And now my whole file won't open at all it'll open with nothing inside ??

    I can't export my video which contains only photos, sound tracks nor play it in fullscreen iMovie it shuts down. And now my whole file won't open at all it'll open with nothing inside ??

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

  • Applet inside a UIX screen

    I am trying to use an applet inside my UIX page. does anyone have any thought on how to do this. I am using Jdev 10g for this. I have gotten as far as the error "element OBJECT not defined in parent pageLayout"
    maybe I just need to know where to stick the code?
    any thoughts?
    thanks

    ok here is the code.
    I would like the applet to appear in the middle of the screen, but this is where I could get the applet to display, also I have not put in the side nav yet.
    thank for the time and effort.
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui">
    <provider></provider>
    <contents>
    <document>
    <metaContainer>
    <head title="Heading here"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <form name="form0">
    <contents>
    <pageLayout title="Title">
    <corporateBranding>
    <image source="ennovation.jpg" />
    </corporateBranding>
    <tabs>
    <tabBar>
    <contents>
    <link text="Home" />
    <link text="Configuration" />
    <link text="Tracking" />
    <link text="ReferenceTables"/>
    </contents>
    </tabBar>
    </tabs>
    <pageHeader>
    <globalHeader>
    <contents>
    <link text=" "destination=""/>
    </contents>
    </globalHeader>
    </pageHeader>
    <globalButtons>
    <globalButtonBar>
    <contents>
    <globalButton text="ERO Suite" />
    <globalButton text="Contact Us" />
    <globalButton text="Help" />
    </contents>
    </globalButtonBar>
    </globalButtons>
    <contents/>
    </pageLayout>
    <pageLayout xmlns:html="http://www.w3.org/TR/REC-html40">
    <contents>
    <html:object classid="clsid:8AD9C840-044E-11D1-B3E9- 00805F499D93" width = "1250" height = "575" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <html:param name = "CODE" value = "com.nwoods.jgo.examples.flower.Flower" />
    <html:param name = "CODEBASE" value = "." />
    <html:param name = "ARCHIVE" value = "Flower.jar" />
    <html:param name="type" value="application/x-java- applet;version=1.3"/>
    <html:param name="scriptable" value="false"/>
    </html:object>
    </contents>
    </pageLayout>
    <pageLayout>
    <contents>
    <copyright>
    <styledText text="Ennovation Inc 2004"
    styleClass="OraCopyright"/>
    </copyright>
    <privacy>
    <link text="Privacy Statement" destination=""/>
    </privacy>
    </contents>
    </pageLayout>
    </contents>
    </form>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    </handlers>
    </page>

  • Ask for Username and Password while Opening an Applet

    Can we code such a way that , While we open an Applet , It should ask for User and password and upon sucessful validation , the Main applet must be loaded !
    Any Suggestions Please !
    Thanks .....

    public class FirstApplet extends Applet {
         private boolean authentified = false;
         private SecondApplet applet = null;
         public void init() {
              System.out.println("FirstApplet: init()");
              authentified=authentificate();
         public void start() {
              System.out.println("FirstApplet: start() "+authentified);
              if (authentified==true) {
                   applet=new SecondApplet();
                   applet.init();
                   applet.start();
         public void stop() {
              System.out.println("FirstApplet: stop()");
              if (applet!=null) applet.stop();
         public void destroy() {
              System.out.println("FirstApplet: destroy()");
              if (applet!=null) applet.destroy();
         private boolean authentificate() {
              System.out.println("FirstApplet: authentificate()");
              // ask the user for username and password
              // check the password, if it's ok, return true
              // if it's not okay, return false
              // how to do a login window, see
              // http://www.codeguru.com/java/articles/510.shtml
              return true;
    }

Maybe you are looking for

  • Why this code is not working for alv

    Dear Regards, i have implemented the same program for ALV which i have used earlier in the reports. but now it is showing no output: *& Report  ZTCT1_ALV2                                                  * REPORT  ztct1_alv2                          

  • Can only Reconnect Media one file at a time

    I posted this problem almost two months ago, and was told at the time that it was a bug in FCP 6.0 and 6.0.1, but was fixed in 6.0.2. Well, I finally upgraded to 6.0.2, and the problem remains. What is strange, is that after I upgraded, the first two

  • Correlating AS2 MDN to Original IDoc?

    Hi All - I have got the following scenario: 1) Backend system (ECC) sends IDoc to SAP PI. 2) SAP PI maps IDoc to EDIFACT message and sends via AS2 to B2B Partner. 3) B2B Partner sends back AS2 MDN to acknowledge receiving of AS2 message. __Question:_

  • Vendor Prepayment - Config settings

    Hi Friends, Could you please list , Vendor Prepayment config steps?? I am configuring it under MM-LIV - Incoming Invoice - Prepayment Regards, Jackie

  • How to fill LRAW data type from an internal table?

    Hi experts, I have a data type LRAW. ZCLUSTR type INT2. ZLOG type LRAW. It is said that: LRAW: Uninterpreted byte string of any length, but has to be declared with a minimum length of 256. Fields of this type must be located at the end of transparent