FileDocCategorySizeDatePackage
ShowImage2.javaAPI DocExample1462Mon Oct 16 19:44:02 BST 2000None

ShowImage2

public class ShowImage2 extends Applet implements ImageObserver

Fields Summary
Image
picture
Constructors Summary
Methods Summary
public booleanimageUpdate(java.awt.Image i, int flags, int x, int y, int w, int h)

	   System.out.println( "Flags = " + flags );
	   if( (flags & ImageObserver.ABORT) != 0 )
	      System.out.print( "ABORT " );
	   if( (flags & ImageObserver.ALLBITS) != 0 )
	      System.out.print( "ALLBITS " );
	   if( (flags & ImageObserver.ERROR) != 0 )
	      System.out.print( "ERROR " );
	   if( (flags & ImageObserver.FRAMEBITS) != 0 )
	      System.out.print( "FRAMEBITS " );
	   if( (flags & ImageObserver.HEIGHT) != 0 )
	      System.out.print( "HEIGHT " );
	   if( (flags & ImageObserver.PROPERTIES) != 0 )
	      System.out.print( "PROPERTIES " );
	   if( (flags & ImageObserver.SOMEBITS) != 0 )
	      System.out.print( "SOMEBITS " );
	   if( (flags & ImageObserver.WIDTH) != 0 )
	      System.out.print( "WIDTH " );
	      
	   System.out.println( "x = " + x + " y = " + y + " w = " + w + " h = " + h );

	   if( (flags & ImageObserver.ALLBITS) != 0 )
	      return false;
      else
         return true;
	
public voidinit()

		picture = getImage( getCodeBase(), "graphics/duke.gif" );
	
public voidpaint(java.awt.Graphics g)

		g.drawImage( picture, 25, 25, this );