Link to home
Start Free TrialLog in
Avatar of msberth
msberth

asked on

drawing many rectangles at once.

hi.
i need assistance with drawing a many rectangles 0f the same size  at diffrent positions. say i want to draw four rectangles to be displayed. all the rectangles should have some string in them. how do i go about that? are loops gonna be used? assistance with sample code will be appreciated
Avatar of zzynx
zzynx
Flag of Belgium image

Maybe this link can help: http://www.javaalmanac.com/egs/java.awt/pkg.html#Shapes
Browse around.
>> are loops gonna be used?

If you have only 4 to be displayed, you can do it without using a loop (using a loop would still be better). The advantage of using a loop is - you can modify the number of rectangles to be drawn at any point of time. Have a look at Java Almanac's examples.
ASKER CERTIFIED SOLUTION
Avatar of delphi3
delphi3

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of delphi3
delphi3

msberth,

Thanks for the points and grade. :)

Delphi3