import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.applet.Applet; import com.sun.image.codec.jpeg.*; import java.io.*; import javax.swing.*; public class Joonis2 extends Applet implements MouseListener, ActionListener, MouseMotionListener{ BufferedImage pilt=new BufferedImage(300, 300, BufferedImage.TYPE_INT_RGB); Graphics2D piltg; String[] varvinimed={"Sinine", "Kollane", "Roheline"}; Color[] varvid={Color.blue, Color.yellow, Color.green}; Choice varvivalik=new Choice(); Choice tegevusevalik=new Choice(); Choice laiusevalik=new Choice(); String[] tegevused={"Ringjoon", "Vabakäsi"}; Button salvestusnupp=new Button("Salvesta"); Button avamisnupp=new Button("Ava"); Button failinimenupp=new Button("Failinimi"); TextField pilditf=new TextField("pilt1.jpg"); int hax, hay; public Joonis2(){ piltg=pilt.createGraphics(); for(int i=0;i