title: ArrayList of Shapes
body: <p>I have some problem with my code. I want to write program which paints Rectangle, Circle and one more shape created from points. I want to use Graphics2D and here is my question: How to make one ArrayList of all this shapes? Is it even possible? I made sth like this:<br/></p>
  
  <pre><code>List&lt;Shape&gt; shapesArray = new ArrayList&lt;Shape&gt;();
  shapesArray.add(new Rectangle2D.Double());
  shapesArray.get(0).setFrameFromDiagonal(point_a, point_b)
  </code></pre>
  
  <p><br/> When i do it like that i can't use Rectangle2D methods.</p>
  
  <p>Thanks for help</p>