|
-
Feb 25th, 2008, 02:24 PM
#1
[RESOLVED] Exists in Applet but not in Application
I have a Applet that compiles error free.
It has...
Code:
import java.awt.*;
'
'
'
void some_method(Graphics g)
{
'
'
g.drawImage(offscreenImg, 0, -60, this);
'
'
}
'
'
But when i put it in an Application like above I get following error:
error J0078: Class 'Graphics' doesn't have a method that matches 'drawImage(Image, int, int, MyJavaApp)
What am I missing in the Application?
-
Feb 25th, 2008, 03:01 PM
#2
Re: Exists in Applet but not in Application
Your "MyJavaApp" class doesn't implement the ImageObserver interface
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Feb 25th, 2008, 04:12 PM
#3
Re: Exists in Applet but not in Application
Umm...I know that comes with the Applet but when I do...
import import java.awt.*;
Public class MyJavaApp extends Frame implements ImageObserver
I get this
error J0049: Undefined name 'ImageObserver'
I also get an error when I do this
import java.awt.image saying
error J0049: Undefined name 'java.awt.image
but the books I have say that ImageObserver is in that package
-
Feb 26th, 2008, 01:51 AM
#4
Re: Exists in Applet but not in Application
perhaps the fact that you're using J++ instead of Java is causing this
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Feb 26th, 2008, 09:56 AM
#5
Re: Exists in Applet but not in Application
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|