ShowImage2public class ShowImage2 extends Applet implements ImageObserver
Fields Summary |
---|
Image | picture |
Methods Summary |
---|
public boolean | imageUpdate(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 void | init()
picture = getImage( getCodeBase(), "graphics/duke.gif" );
| public void | paint(java.awt.Graphics g)
g.drawImage( picture, 25, 25, this );
|
|