Java J2EE Spring Creating 2-Dimensional Shapes

In the previous chapters, we learnt how to create an empty frame and also writing out some stuff on it. The next step in creating UI components with Swing is to start drawing 2 dimensional shapes like lines, rectangles, circles and so on. This is what we are going to learn in this chapter.

So, lets get started!!!

Drawing 2 Dimensional Shapes:

Starting with Java 1.0, the Graphics class had