How many different ways are there to draw a rectangle in Java
<p>I've been learning Java GUI components, and it seems there a lot of various methods to draw rectangles and other shapes, but especially rectangles.  Out of curiosity, is there a comprehensive list somewhere, or is does someone know them all well enough to list them?
I realize this a juvenile question, but I find it unnecessary to have so many methods.</p>

<p>Some that I have come across during the learning process:</p>

<ul>
<li><p>drawRect method</p></li>
<li><p>Rectangle class (java.awt.Rectangle)</p></li>
<li><p>draw3DRect</p></li>
<li><p>using Rectangle class with grow function</p></li>
<li><p>setsize() of JPanel then paint it with fillRect()</p></li>
</ul>
