PDA

Click to See Complete Forum and Search --> : [RESOLVED] Exists in Applet but not in Application


jmsrickland
Feb 25th, 2008, 01:24 PM
I have a Applet that compiles error free.

It has...

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?

ComputerJy
Feb 25th, 2008, 02:01 PM
Your "MyJavaApp" class doesn't implement the ImageObserver interface

jmsrickland
Feb 25th, 2008, 03:12 PM
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

ComputerJy
Feb 26th, 2008, 12:51 AM
:D perhaps the fact that you're using J++ instead of Java is causing this

jmsrickland
Feb 26th, 2008, 08:56 AM
Case problem