You should become familiar with the
Java API Documentation as it contains your answers. Why isn't the background red? The Java
Doc for Graphics2D.setBackground says:
Setting the background color in the Graphics2D context only affects the subsequent clearRect calls and not the background color of the Component.
java.awt.Graphics2D Why isn't the text showing up? The Java Doc for Graphics.drawString says:
The baseline of the leftmost character is at position (x, y) in this graphics context's coordinate system.
java.awt.Graphics So your
string is getting written, it's just getting written off the visible image.
[ January 09, 2007: Message edited by: Joe Ess ]