Drawing simple graphics in NetBeans
I am trying to draw some simple graphics in NetBeans (6.9.1).
Say, I have a jFrame, and a jPanel inside the jFrame... the usual code as generated by a simple NetBeans project.
Now, I need to 'draw' some rectangles side-by-side (much like a checker or chess board) in jFrame.
The total number of rectangles should be modifiable (e.g. in separate textbox.. I have this in the code). Of course, when the user changes this number, the grid should update and show the correct number of rectangles in the grid.
Anyone could link to any simple tutorial or example please? Do I need to use AWT? How does Swing draw graphics?