Getting an Image from source using Applet and AWT

import java.applet.Applet;
import java.awt.*;

/*
<applet CODE="ImageDemo.class" WIDTH=400 HEIGHT=100>
</applet>
*/
public class ImageDemo extends Applet {

Image i;
public void init()
{
i=getImage(getCodeBase(),"kalam.gif");
}
public void paint(Graphics g)
{
g.drawImage(i,10,10,this);
}
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|