Syntax for Execute this program :
Firstly then name of class and file should be and run your java file

 Syntax : Appletviewer filename.java
 Example : Appletviewer simple_applet.javaimport java.awt.*;
import java.applet.*;
/*
<html>
<body>
<applet code="insert_image" width=800 height=800>
</applet>
</body>
</html>
*/

public class insert_image extends Applet
{
 Image picture;
 public void init()
 {
 picture = getImage(getDocumentBase(),"friendss.jpg");
 }
 public void paint(Graphics g)
 {
 g.drawImage(picture,30,30,this);
 }
 }
OUTPUT

 insert

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA