import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Graph extends Applet implements MouseListener{ Choice c=new Choice(); Checkbox b=new Checkbox(); public void init(){ addMouseListener(this); add(c); add(b); c.addItem("big"); c.addItem("littel"); } public void mousePressed(MouseEvent e){ Graphics g=getGraphics(); g.setColor(new Color(e.getX()+e.getY(), e.getX(), e.getY())); String c2=c.getSelectedItem(); if(b.getState()){ if(c2.equals("big"))g.drawOval(e.getX()-15, e.getY()-15, 50, 50); if(c2.equals("littel"))g.drawOval(e.getX()-15, e.getY()-15, 30, 30); } else{ if(c2.equals("big"))g.drawRect(e.getX()-15, e.getY()-15, 50, 50); if(c2.equals("littel"))g.drawRect(e.getX()-15, e.getY()-15, 30, 30); } } public void mouseReleased(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseClicked(MouseEvent e){} }