Draw a label in canvas

Hi

i want to draw a rectangle (which contains 2 lines of text) in a canvas, then i want to animate this rectangle with the text inside it.

i used:

g.fillRect

but, i couldn't add a text to it.

can i draw a label instead of rectangle?so i can easly add a text to it.

i used g.drawImage, but i don't want to use images in my applet because i will use a lot of rectangles with different text.

Thanks for help.

[456 byte] By [J_proga] at [2007-11-26 13:10:32]
# 1
> but, i couldn't add a text to it.Why not?> i used g.drawImage, but i don't want to use images in> my applet because i will use a lot of rectangles with> different text.Who, this being the 21st century, still uses AWT?
CeciNEstPasUnProgrammeura at 2007-7-7 17:24:53 > top of Java-index,Java Essentials,New To Java...