A common mistake I used to make is not make the Panel Visible.

There is a setVisible(true) method on every component.

if you haven't already -- try that and see what happens.

Conrad

Original Message:
-----------------
From:  [EMAIL PROTECTED]
Date: Wed, 24 Mar 2004 12:25:31 EST
To: [EMAIL PROTECTED]
Subject: [Juglist] drawing on a canvas


I feel silly asking, but what is the trick for drawing graphics on a canvas?

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().

what am I leaving out? this is jdk 1.2.2, no swing. 


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



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

Reply via email to