Results 1 to 5 of 5

Thread: [RESOLVED] Exists in Applet but not in Application

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Resolved [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?

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    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

  4. #4
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    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

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Exists in Applet but not in Application

    Case problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width