Пример #1
0
 /**
  * Add a point to the model when the user drags the mouse, and repaint the window. Need more logic
  * to draw solid lines.
  */
 public void mouseDragged(MouseEvent event) {
   Point point = event.getPoint(); // find point
   model.addPoint(point);
   view.repaint();
 } // end method mouseDragged