How to run swing applets???

I already posed this question yesterday but i got no replies.please help me out.
I understand it is a typical question and there lot of articles on it. I tried but am confused. I installed JRE1.3 which has java plug-in along with it which supports swing applets in a browser.Once i got that plug in i also downloaded html converter but am confused how should i run my swing applet.Can anyone please explain in simple steps as to how to achieve this objective..Thanks much in advance..an example would be of real big help
Thanks

u need to convert ur html-page with the applet-tags with the htmlconverter.

Similar Messages

  • How to run swing applets in a browser??

    I understand it is a typical question and there lot of articles on it. I tried but am confused. I installed JRE1.3 which has java plug-in along with it which supports swing applets in a browser.Once i got that plug in i also downloaded html converter but am confused how should i run my swing applet.Can anyone please explain in simple steps as to how to achieve this objective..Thanks much in advance..an example would be of real big help
    Thanks

    The below links will help you.
    http://java.sun.com/products/plugin//1.3/docs/index.docs.html
    http://java.sun.com/products/plugin/1.3/plugin.faq.html

  • Which command i use to run SWING APPLET

    Hi friends,
    i m a new in swing technology i got and problem when i run swing applet .
    i make a file and complie it with -deprecation it work and make a .class file but how can i run this applet [i use jview command , appletviewer command but it can't work]
    i hope that someone hellp me.

    Just as a matter of interest and i know its a stupid question, but did you create a html file to access the class file/jar
    Here is some example code of an applet html page
    Hope it helps...
    Also have you put it in a Jar file?
    <html>
    <head>
    <title>(Whatever title youu want)</title>
    <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
    <TR>
    <APPLET CODE = "ClassName.class" ARCHIVE = "JarName.jar" WIDTH = "800" HEIGHT = "600"></XMP>
    <PARAM NAME = CODE VALUE = "ClassName.class" >
    <PARAM NAME = ARCHIVE VALUE = "JarName.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false">
    <dont worry about this>(they just variables for my applet)
    <PARAM NAME = SERVER_IP VALUE ="192.1.1.209">
    <PARAM NAME = SERVER_PORT VALUE =8701>
    <PARAM NAME = DEBUG VALUE =true>
    <PARAM NAME = REFRESH VALUE =10000>
    <PARAM NAME = TAIL_REFRESH VALUE =2500>
    <PARAM NAME = MESSAGE_TIMEOUT VALUE =60>
    </dont worry about this>
    </APPLET>
    </body>
    </html>

  • Run swing applet without installed plug-in

    Is any possible way to run swing applet without installed java plug-in? Does exist way how to load swing classes from server?

    Is any possible way to run swing applet without
    installed java plug-in? Does exist way how to load
    swing classes from server?It is impossible to run a swing applet without the plug-in.
    There may be a solution : include the swing library in your applet,
    so you don't need the plugin anymore (personnaly i prefer having
    the plugin downloaded once and the use it as needed).
    For the load from a server you will need to be more specific, but
    don't forget : the applet don't run on the server, so it won't request
    Swing classes from the server.

  • HOw to run the Applet in dos mode

    how to run the applet in Command Prompt(DOS).
    I have save this in directory D/vijay/javap/A.java and my JDK is in C drive.
    Plz send me reply as soon as possible.
    My code is :-
    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
         w = 45;
         h = 50;
    public void paint(Graphics g)
         g.drawRect(w, h, 20, 80);
    }

    import java.applet.*;
    import java.awt.*;
    public class A extends Applet
    private int w, h;
    public void init( )
    w = 45;
    h = 50;
    public void paint(Graphics g)
    g.drawRect(w, h, 20, 80);
    <applet class="A" height="200" width="200" code="A.class">
    </applet>
    */And in command prompt
    javac A.java
    appletviewer A.java
    Message was edited by:
    passion_for_java

  • How to run an Applet using the JDK1.3.1 platform?

    I'm a beginner of Java Applet.
    I've type in the sample program provided in the text book, and compiled it using the jdk1.3.1 platform.
    Usually we run a java program using java [filename], right?
    How about running an applet file?
    What is appletviewer function?
    Thanks!

    I try to put it in a HTML page but it required me to download a Java Virtual Machine.
    I've been searching sources for that but stil cannot get.
    This is always what I get:
    [We're sorry, you cannot view this page because it requires the Microsoft Java Virtual Machine (MSJVM). Your machine does not have the MSJVM installed. For more information please visit www.microsoft.com/java.]
    I visit java.sun.com. On the right side of the page listed with the HOT DOWNLOADS.
    I click on the Java VM but still cannot get anything...
    Can u help me on that?
    I've been trying for 2 days already.
    Thanks!

  • How to Run Swing in Browser

    Hi frnds
    I gotta a Problem in swing.I want to run my swing in Browser.I have tried it with JApplet.But i can execute it only in Console.using appletviewer <filename>.html
    how to run it in browser.
    Please Help Me..

    Quite easy, well for you. You have to have the newest java plug in working in your browser, but as a flaw, if a user wants to access it they need to download it too, but there is a way in the new JDK i believe to have the JRE on Suns server to run the applet, so the user w/o the Swing librarys can use the applet w/o problems

  • How to run an applet(in a html file) in the server?

    I am using the jpedal Viewer inmy code, I embedded the applet code
    in a html file , it is running fine, but when I try to run the same Viewer applet in the Server it is throwing an error
    "java.lang.NoClassDefFoundError: org/jpedal/objects/acroforms/DefaultAcroRenderer
         at org.jpedal.PdfDecoder.startup(Unknown Source)
         at org.jpedal.PdfDecoder.<init>(Unknown Source)
         at pdfViewer.PdfApplet.init(PdfApplet.java:199)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)"
    What is the problem ?
    Please suggest solution for it?
    Its urgent

    I am trying to run the Applet in Tomcat server,
    Could you post the code where you invoke the Applet? It sounds like you're saying you're trying to run the Applet as part of your server-side code. The other interpretation is that you are simply accessing the Applet through the browser that happens to be on the machine being used as the server.
    Like I say, post the code that shows how you're trying to use the Applet "on the server".

  • Urgent ! how to run swing from dos

    hi
    how should i run swing program through dos prompt.when found in i tried compiling from c:\jdk\bin i got an error "package javax.swing not import".
    viji

    what you willdo is this,
    at the top of your code type the line.
    import javax.swing.*;
    //for event type the next line..
    import javax.swing.event.*;
    import java.awt.event.*;
    I think this should solve your problem.

  • How to run "ClickMe" applet?

    public class Spot {
    public int size;
    public int x, y;
    public Spot(int intSize) {
    size = intSize;
    x = -1;
    y = -1;
    ===================================================================
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class ClickMe extends Applet implements MouseListener {
    private Spot spot = null;
    private static final int RADIUS = 7;
    public void init() {
         addMouseListener(this);
    public void paint(Graphics g) {
         //draw a black border and a white background
    g.setColor(Color.white);
         g.fillRect(0, 0, getSize().width - 1, getSize().height - 1);
    g.setColor(Color.black);
         g.drawRect(0, 0, getSize().width - 1, getSize().height - 1);
         //draw the spot
    g.setColor(Color.red);
         if (spot != null) {
         g.fillOval(spot.x - RADIUS, spot.y - RADIUS, RADIUS * 2, RADIUS * 2);
    public void mousePressed(MouseEvent event) {     
    if (spot == null) {
    spot = new Spot(RADIUS);
         spot.x = event.getX();
         spot.y = event.getY();
         repaint();
    public void mouseClicked(MouseEvent event) {}
    public void mouseReleased(MouseEvent event) {}
    public void mouseEntered(MouseEvent event) {}
    public void mouseExited(MouseEvent event) {}
    ==============================================
    how to run it ?
    Thank you advance~

    1.I have compiled it like this D:/>javac ClickMe.java
    2.I also have wirtten "HTML":<applet code=ClickMe.class width=100 height=50>
    </applet>
    3.My problem is the compiling,there have many errors.The compiler say :It is CLASSPATH error.
    I want to know when I run a applet how to set CLASSPATH in different conditons, such as the applet have
    package or not have package .
    Especially, I want to know how the "ClickMe" run.
    thank you all the same .

  • How to run an applet with .java files in 2 dirrerent directories ?

    I have an applet with :
    5 .java class files and its .html file in one directory and
    2 .java class files ( with identical names) and its .html file in another directory .
    How do I go about executing this applet ? In the past all the applets
    I have run had all the classes in one directory.
    Thank you in advance

    If you want them both in the same page, put both applet tags in 1 page,
    I could do that but both directories have a SpaceDunes.class
    and both directories have a Shot class (diffferent immplementations
    but the same name)
    so the applet tag
    <APPLET CODE="SpaceDunes.class"
    CODE="SpaceDunes.class"
    This can't be the right approach ? ?
    Thank you for your advice
    <HTML>
    <HEAD>
      <TITLE>SpaceDunes Applet
      </TITLE>
    </HEAD>
        <BODY>
         <H1>SpaceDunes Applet
        </H1>
          <HR>
            <APPLET CODE="SpaceDunes.class"
                              CODE="SpaceDunes.class"
                         WIDTH=500
                         HEIGHT=500
                           CODEBASE=".">
                ALT="Your browser understands the <APPLET>
                         tag but isn't running the applet, for some reason."
                          Your browser is ignoring the <APPLET> tag!
          </APPLET>
         <HR>
        </BODY>
    </HTML>

  • Sorry if i sound foolish how to run an applet through a java application

    I am into java from last one month ank keep on exploring it in the want to
    recently i created a application cum applet in the same class like
    applet is doing its own task and there is a main method in the code
    that does entirly different task lets assume displaying *'s on the dos prompt the program is getting complied and belive it its running as desired
    but the only problem that i m facing if i use appletviewer Myclass.java
    only the appletprog is displayed
    and if i run java Myclass than only dos task is done
    may be it is sounding foolish for most of you but if i can get a way
    which will help me in excecuting only one of it and both of them run succesfully
    it tryied different ways to do it but was not succesful
    please do not get irreated if its bizzered but if you really have a solution for it .i will appreciate it
    thanking you

    Yes you can run an Applet from an application. The magic bit is providing an AppletContext and AppletStub!
    Here's how you start it:
            wpa = new WayPointsApplet(this);
            new AppletWrapper(wpa, 380, 320);Here's the class definition: (includes code for my application that can be ignored.
    // Define a wrapper class for the applet
    class AppletWrapper extends Frame implements AppletStub, AppletContext {
        Applet applet;
        // Constructor
        AppletWrapper(Applet a, int x, int y) { 
              applet = a; 
              setTitle(a.getClass().getName());
              setSize(x, y);
              Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();
              setLocation((ss.width-x)/2, (ss.height-y)/2);
              add(a, "Center");
              a.setStub(this);
              // Trap window closing
              addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent we) {
                    // Test if Write left undone before exiting???
                    if(WayPoints.wpa != null) {
                      if(!WayPoints.wpa.okToExit())
                         return;           // Ignore
                    applet.stop();
                    applet.destroy();
                    if(WayPoints.debug || WayPointDefs.plot_debug) {
                      SaveStdOutput.stop();
                    System.exit(0);         // EXIT Program
              });  // end WindowListener
              a.init();
              show();
              a.start();
       } // end constructor
        // AppletStub methods
        public boolean   isActive() { return true; }
        public URL       getDocumentBase() { return null; }
        public URL       getCodeBase() {
            return WayPoints.currDir;
        public String    getParameter(String name) {
            if (name.equalsIgnoreCase("DEBUG")) {
                if (WayPoints.debug)
                    return "YES";
                else
                    return "NO";
            if(name.equals("PLOTDEBUG"))
                return (WayPointDefs.plot_debug ? "YES" : "NO");
            if (name.equalsIgnoreCase("SERVER"))
                return "NO";
            return "";
        public AppletContext getAppletContext() { return this; }
        public void      appletResize(int width, int height) {}
        // AppletContext methods
        public AudioClip getAudioClip(URL url) { return null; }
        public Image     getImage(URL url) { return null; }
        public Applet    getApplet(String name) { return null; }
        public Enumeration getApplets() { return null; }
        public void      showDocument(URL url) {}
        public void      showDocument(URL url, String target) {}
        public void      showStatus(String status) {}
    } // end class AppletWrapper

  • How to run the applet in JSP

    hi,
    im trying to run an applet from JSP i am not able to see the output of the applet on the JSP page?
    <APPLET CODE="com.metro.supex.admin.SampleApplet.class" HEIGHT="25" WIDTH="125" ALIGN="bottom"></APPLET>
    this line of code is included in JSP to run the applet, it is giving error
    java.lang.ClassNotFoundException:com.metro.supex.admin SampleApplet
    please can you help me in this matter.

    And don't use the applet tag, use object embed.
    use the htmlconverter in the jdk bin dir to convert an applet tag.

  • Urgent: How to run Multiple Applets from a URL

    Hi,
    I am developing an applet that needs memory more than 64MB and I have used -Xmx to set it to 128 MB.
    On my web page, I have 3 applications that use the same JAR file of the applet, but the problem is all applets are opened/loaded in same heap space by JVM. So, when I load first applet, it uses 80 MB and when I start 2nd applet, after using 40 MB, it throws OutOfMemory exception.
    Is there a way to start each applet with fresh 128 MB heap space rather than all applets sharing 128 MB heap space?
    Thanks,
    Ajit

    That's some hefty requirements for an applet. I believe that the only way to do the Xmx thing on the client side is to have them manually add it in the JVM arguments section of the Java Plugin Control Panel.
    The browser/plugin is going to use the same JVM to run all 3 applets in a page. I've never seen a way to tell it to do otherwise. The only separation is the applet contexts, but that is more of a security manager grouping thing.
    Maybe you should look into how you can better manage your data so you don't need so much memory.

  • Running Swing Applet

    After running through HTML converter 1.3, my applet is running in Internet explorer but doe NOT run in Netscape Navigator.
    I used 'extension template' while converting the Applet.
    When I am running in Netscape Navigator, I am getting 'Applet Not Initialized' error message even though I have explicitly written the 'init' method.
    Does ANYONE have any idea? Could you help me??
    I am posting my code here :
    HTML file :
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
    <title>My Applets</title>
    </head>
    <body>
    <!--"CONVERTED_APPLET"-->
    <!-- CONVERTER VERSION 1.3 -->
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "328" HEIGHT = "224" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = "WelcomeApplet.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3" CODE = "WelcomeApplet.class" WIDTH = "328" HEIGHT = "224" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "WelcomeApplet.class" WIDTH = "328" HEIGHT = "224">
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
    </body>
    </html>
    MY JAVA FILE :
    import java.awt.*;
    import javax.swing.*;
    public class WelcomeApplet extends JApplet
    public void init() {
    public void paint (Graphics g)
    super.paint(g);
    g.drawString( "Welcome to Java Programming" , 25, 25);
    Thank You in advance.

    Hi,
    I'm not too sure what is happening with your setup - but I can say your applet & HTML all work fine for me using 1.3.1_01a/1.4 on Netscape 4.08/6.2.1 and IE 5.5 on WindowsNT 4 sp6.
    Maybe you could post the JRE you are using and also the browser version?
    Regards,
    Matt
    Java Developer Technical Support
    Sun Microsystems

Maybe you are looking for

  • Purchased music no longer available for redownload

    I looked at my iTunes cloud purchases today and noticed that 1 full album was missing, and several others were missing many of the tracks in the albums.  All of the albums are available for purchase on iTunes, but are not available for redownload on

  • Print Queue will not remove print jobs

    I am running Windows Server 2008 R2 Standard. I have a Printer HP LaserJet P4015n set up as a network printer thru DNS.  The printer is working fine all print job will come out. Each time I send a print job to stays in the queue with the Status "Sent

  • Regarding performance impact if I do DB accessing coding in comp Controller

    Hi , This is my project requirement, I have to use some com compoment which in turn fetches data from the database. I am using a java com bridge tool to do this. This tool is generating the java proxy classes for the VB com component. I am using java

  • JMS Receiver Adaptor error

    Hi, I am facing issue in JMS receiver adapter can you please give me some suggestions. JMS adaptor: Message processing failed. Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at ABC_JMSRe

  • Vertical text in ALV header (WD4A)

    HI, Can anybody tell me how I can display ALV header text in WD4A as vertical text ? Cheers, John