> what am I leaving out? this is jdk 1.2.2, no swing.
Hard to say precisely without seeing the code, but it's very possible
that your Canvas has zero size. One of the AWT issues is that you have to
override the class to setPreferredSize().
If you look on the Java Tutorial downloads page, there is an archived
section on that AWT that is no longer included in the main tutorial. You
may find it helpful. If your code is short, someone on the list may be able
to review it when time is available.
Any particular reason you're not using Swing?
Joe Sam
Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 24, 2004 12:25 PM
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.
>
_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org