CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    Swing with Browser

    I wrote applet using Swing but my Netscape browser not view Swing.I'm using
    Var 4.5 ..What varsion support the Swing or Thear are any other browser.
    and Hotjava Var 3.0 dosent support swing.
    How can i solve this..



  2. #2
    Join Date
    Jun 1999
    Location
    Atlanta, GA
    Posts
    57

    Re: Swing with Browser

    This is becuase they have old JRE with in them.
    You can work around as follows...
    You can download the swing set from the SUN and add that JAR ( say swing.jar ) to your applet as an archive parameter.
    If the browser is Java enabled then you won't have any problems in running your Swing application on machines which does not support Swing.

    Hope this helps..

    Meher

  3. #3
    Join Date
    Oct 1999
    Location
    Santa Clara, CA
    Posts
    2

    Re: Swing with Browser

    Could you provide more info on how to add the jar file to an applet as an archive parameter? Maybe a link to detailed instructions? I'm currently using Sun's converter, but that seems to be an inefficient way to do it, if an applet uses only one swing class.


  4. #4
    Join Date
    Jun 1999
    Location
    Atlanta, GA
    Posts
    57

    Re: Swing with Browser

    Here is the example how to specify a JAR file for an applet.

    <APPLET CODE="myClass.class" CODEBASE="srcDir" WIDTH=400 HEIGHT=300 ARCHIVE="myLib.jar" >
    </APPLET>

    Coming back your problem - there is a work around to do this.
    Since you said you are using a single class from the SWING
    what you can do is extract that class from the JAR and directly
    embed it in your code. This is little tricky - let me know if
    you want to do like this. I 'll send you the instuctions how you can do this.
    Other wise if you have no problem in using the swing's jar file, than attach that as archive to your applet.



    Meher

  5. #5
    Join Date
    Oct 1999
    Location
    Santa Clara, CA
    Posts
    2

    Re: Swing with Browser

    Yes, I would like to embed in my code. That seems to me to be the most effecient way to go. I've set up for all replies to go to my real addr. Is this all you need? First time on this list, so I'm a bit lost.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured