import java.awt.image.*; import java.awt.geom.*; import java.awt.*; import java.applet.*; public class Pildiuhtlustus1 extends Applet{ BufferedImage pilt1=new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); BufferedImage pilt2=new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); public Pildiuhtlustus1(){ Graphics g=pilt1.createGraphics(); g.setColor(Color.green); g.fillOval(10, 10, 80, 80); g.setColor(Color.blue); g.fillOval(10, 10, 20, 20); g.setColor(Color.red); g.fillOval(70, 70, 20, 20); float andmed[]=new float[]{0.5f, 0, 0, 0, 0, 0, 0, 0, 0, 0.5f}; ConvolveOp co=new ConvolveOp(new Kernel(10, 1, andmed)); //10 veergu(x), 1 rida(y) co.filter(pilt1, pilt2); } public void paint(Graphics g){ g.drawImage(pilt1, 25, 50, this); g.drawImage(pilt2, 175, 50, this); } public static void main(String argumendid[]){ Frame f=new Frame("Pildile vari"); f.add(new Pildiuhtlustus1()); f.setSize(300, 200); f.setVisible(true); } }