[3823] in java-interest
[Fwd: drawImage outside of paint method ... how?]
daemon@ATHENA.MIT.EDU (John D. Kane)
Tue Nov 28 23:14:29 1995
Date: Tue, 28 Nov 1995 21:08:51 -0500
From: "John D. Kane" <john@insightnews.com>
To: java-interest@java.sun.com
Path: news.worldlinx.com!news
From: "John D. Kane" <john@insightnews.com>
Newsgroups: comp.lang.java
Subject: drawImage outside of paint method ... how?
Date: Tue, 28 Nov 1995 17:26:25 -0500
Organization: INSIGHT New Media Publishing
Lines: 22
Message-ID: <30BB8C91.20D8@insightnews.com>
NNTP-Posting-Host: 204.101.142.10
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b2 (Windows; I; 32bit)
The documentation says I can't create a new graphics context,
but I can make a new one based on an old one. I'm trying to
display an image outside of the paint routine. I've tried to
access an instance of Graphics through such things as:
Graphics g = Graphics(); <== but this a protected constructor.
Graphics g = new Graphics <== just plain stupid but I'm at the
stage where I'll try anything.
Grahpics g = getGraphics(); <== compiles, but won't run.
Graphics g = create(?,?,?...) <== but not sure how this works
Graphics g; <==compiles, but won't run.
When I say "won't run" in the above examples, I mean I get the
"applet not initialized error".
I know I need an instance of Graphics in order to use
drawImage (ie. g.drawImage(...)). This is easy enough inside
the paint routine since one is automatically passed (ie.
paint(Graphics g); but how can I do this outside of the paint
routine?
John
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com