General discussion

  • Creator
    Topic
  • #2080034

    JAVA SWING COMPONENTS

    Locked

    by volksjager ·

    I am writing a JAVA application that uses the JTREE and JSCROLL components. The components work fine in an applet, but do not function at all in a browser environment. Has anybody got a solution for this? I know some swing components are not compatible with browsers, I do hope that these are not some of them and that there is a solution out there to fix this problem.

All Comments

  • Author
    Replies
    • #3903450

      JAVA SWING COMPONENTS

      by msmith ·

      In reply to JAVA SWING COMPONENTS

      Have you looked at the JAVA console when you try to run the applet? Would be useful to know what browser you are talking about but in any case, the swingall.jar must be registered with either netscape or IE to properly run a swing applet. I suspect this is where you are going astray. Contact the developer section of the browser which you are going to use or install the java plugin appropriate for the version of java that you are using.

      Mike

    • #3903447

      JAVA SWING COMPONENTS

      by douglas.nekrasz ·

      In reply to JAVA SWING COMPONENTS

      The problem is with the JVM that comes with most browsers. Netscape is up to 1.1.5 and Internet Explorer supplies its own non standard JVM. Niether inherently support Swing. For both Netscape and IE, you can install another JVM (that includes Swing) with the browser plug-in. Also, for Netscape, you
      can try putting the Swing JAR file (swingall.jar) into the java\classes directory (Program Files\Netscape\Communicator\Program\Java\Classes).

      You can get the plug-in here: http://java.sun.com/products/plugin/
      You should be able to find the Swing JAR file here: http://java.sun.com/products

    • #3902942

      JAVA SWING COMPONENTS

      by miro ·

      In reply to JAVA SWING COMPONENTS

      The problem is not from JTree or other component. The problem is that you use JDK1.2 or higher. All browsers support JDK1.1.
      To start JDK1.2 on NS or IE you have to use PLUG-IN. To create universal HTML you need to use HTMLConverter (you can download from java.sun.com).
      Also you have to put all of your classes in one directory or to make archive with them.
      Also if you use some functions that are not able for Applets, you have to give rights to your applet using “java.policy” in your virtual machine.
      And after that there is not guarantee that your applet will works.
      In my opinion We will not have problems with applets when all browesers support JDK1.3 or JDK1.2 OR when the Browsers are writen on Java – for example if NetScape 5 is writen on JDK1.3 then everything will be OK.

Viewing 2 reply threads