[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?
Re: Exists in Applet but not in Application
Your "MyJavaApp" class doesn't implement the ImageObserver interface
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
Re: Exists in Applet but not in Application
:D perhaps the fact that you're using J++ instead of Java is causing this
Re: Exists in Applet but not in Application