FileDocCategorySizeDatePackage
AvgFilt.javaAPI DocExample1094Mon Mar 24 01:58:44 GMT 1997None

AvgFilt

public class AvgFilt extends Applet

Fields Summary
Image
i
Image
j
Constructors Summary
Methods Summary
public voidinit()

        i = getImage (getDocumentBase(), "rosey.jpg");
        MediaTracker mt = new MediaTracker (this);
        mt.addImage (i, 0);
        try {
            mt.waitForAll();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println ("Loaded");
        j = createImage (new FilteredImageSource (i.getSource(), new BlurFilter()));
        System.out.println ("Created");
    
public voidpaint(java.awt.Graphics g)

        g.drawImage (i, 10, 10, this);                  // regular
        if (j != null)
            g.drawImage (j, 250, 10, this);             // average