[EMAIL PROTECTED] wrote:
I've created a Canvas c, placed it in a Panel p, used g=c.getGraphics() to get the graphic context, set the foreground and background to contrasting colors, but g.drawLine(0,0,10,10) doesn't draw a line no matter how many times I call repaint().

You ARE calling drawLine() from _within_ a paint(g) or update(g) method, right?


If so, are you sure that paint(g) is being called?  A breakpoint or
System.out will confirm this.  If, for instance, your layout was faulty
and the canvas is not visible (e.g. size=0), then paint will never be
called, regardless of calls to repaint().

C

--
-------------------------------------------------------------------------
Chris Merrill                  |  http://www.webperformanceinc.com
Web Performance Inc.           |  http://www.webperformancemonitoring.net

Website Load Testing, Stress Testing, and Performance Monitoring Software
-------------------------------------------------------------------------


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to