Results 1 to 19 of 19

Thread: Java Applet

Threaded View

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Wink Java Applet

    Hey....

    I have created very simple Java Applet. Here the coding has done my-self.


    This is the Java File.

    import java.awt.Graphics;

    public class HelloWorldApplet extends java.applet.Applet
    {
    public void paint(Graphics g)
    {
    g.drawString("Hello World",5,25);
    }
    }

    This is HTML File.

    <html>
    <head>
    <title>Hello To Everyone !</title>
    </head>
    <body>
    <p>My Java Applet Says:
    <applet code = "HelloWorldApplet.class" width=150 height=25></applet>
    </p>
    </body>
    </html>


    Then I used IE6.0 and Applet Viewer to run the applet. But it gives different outputs.


    Output on IE6.0 and Applet Viewer as follws.



    I’m confusing with that. Can someone help me to where I’m going wrong?
    Attached Images Attached Images   

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