Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image Load Java based source code
#1

Code:
import java.awt.*;
import java.applet.*;

/*
<applet code=ImageLoad width=300 height=300>
<param name="img" value="smile.jpg">
</applet>
*/

public class ImageLoad extends Applet
{
  Image img;
  public void init()
  {
  img = getImage(getDocumentBase(), getParameter("img"));
  }
  public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)
  {
  if((flags & ALLBITS) == 0 )
  {
  System.out.println("Still processing the image");
  return true;
  }
  else
  {
  System.out.println("Done processing the image");
  }
  }
  public void paint(Graphics g)
  {
  g.drawImage( img, 0, 0, this);
  }
}
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.