title: How to implement chain of responsibility with Java Swing
body: <p>I have the task of creating a simple drawing app, where one can draw basic shapes (ovals,lines,rectangles) with border and fill colors of choice, using Java Swing and MVC. </p>
  
  <p>The shapes part of the model is implemented using the composite pattern. The functionality to be implementing is drawing (this is already handled by the shapes classes themselves), resizing, moving and deleting shapes and I am supposed to use chain of responsibility (CoR) pattern to accomplish this. </p>
  
  <p>CoR makes sense to me in theory, but I have difficulty grasping how I can apply it for implementing the functionality in practice. I understand that when I click on the drawing panel the program should recognize which shape is selected and then I can implement the methods for resizing,moving,deleting.</p>
  
  <p>So what I need advice on is:</p>
  
  <p>1) how to practically implement CoR pattern here?</p>
  
  <p>2) what is a good way to implement the functionality for resizing, moving, deleting? In own concrete handler classes, as methods in the shapes classes, other?</p>
  
  <p>Many thanks for help. </p>