//Rosette.java import java.awt.*; import java.awt.event.*; //ActionListener "interface" import javax.swing.*; public class Rosette extends JApplet implements ActionListener { //i.e. this class does what's req'd by the interface int sides; int angleIncrement; int loops=0; int animationDelay; //** millisecond delay Timer animationTimer; //** Timer drives animation public void init() { String input; input = JOptionPane.showInputDialog("Enter # of sides of regular polygon"); sides = Integer.parseInt(input); input = JOptionPane.showInputDialog("Enter animation delay in ms"); animationDelay = Integer.parseInt(input); input = JOptionPane.showInputDialog("Enter angular increment in degrees"); angleIncrement = Integer.parseInt(input); startAnimation(); //*** begin animation } //** will be called once every animationDelay ms public void paint(Graphics g) { super.paint(g); //clears screen each call int radius=getWidth()