On 22 Apr 2004 06:43:36 -0700,
ehendrikd@yahoo.com (Evan Dekker) wrote
or quoted :
[color=blue]
> public void paint(Graphics poGraphics) {
> super.paint(poGraphics);
>
> System.out.println("here");
>
> Color oForegroundColor = poGraphics.getColor();
> poGraphics.setColor(getBackground());
> poGraphics.fill3DRect(20, 20, 100, 100, true);
> poGraphics.setColor(oForegroundColor);[/color]
Normally you would create a custom Component based on Canvas for AWT
or JPanel for Swing and add that component to your Applet. With Swing
you are supposed to override paintComponent, not paint.
For your experiment, I would use explicit and unique colours e.g.
Color.MAGENTA not getColor and getBackground to eliminate the
possibility that is where your problem lies.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See
http://mindprod.com/jgloss/jgloss.html for The Java Glossary.