package Scribble; /** * This class performs neccessary initializations to put * a fully functional scibble board up on the screen. **/ public class Startup { /** * This is the main routine called at startup. * It accomplishes all initialization **/ public static void main(String[] args) { // Create new components ScribbleData lines = new ScribbleData(); SmartCanvas drawArea = new SmartCanvas(lines); Whiteboard wb = new Whiteboard(drawArea); // Create listener which will process all events MyMouseListener m = new MyMouseListener(lines, drawArea); // Add the listener to the appropriate components drawArea.addMouseListener(m); drawArea.addMouseMotionListener(m); wb.clearButton.addActionListener(m); wb.colorChoice.addItemListener(m); } }