Re: What wrong? (Compiler error message)

From: Dan (fergusprint_at_casino.com)
Date: 11/29/03


Date: Sat, 29 Nov 2003 16:17:14 +0100


> The source code would help to diagnose the problem.

What I basically want to do is to paint on an image in my non-main
object, then pass this image to the main function (which is an applet),
thus being able to draw i using drawImage in the paint-function. The
erroneous source code is this (stripped from uninteresting parts)

import java.awt.*;
import java.awt.image.*;

public class Arnold {
    private Image im;
    private Graphics imGraphics;

    public void Arnold() {
        //im = new Image(); // Not possible
        //imGraphics = new Graphics();
        im = Component.createImage(1,1); //
        imGraphics = im.getGraphics();
    }

    // Methods painting on im via imGraphics
        
    public Image getImage() {
        return im;
    }

}

        / Dan



Relevant Pages

  • Re: Applet Crashes on Firefox.
    ... answer than that you need to provide some source code. ... Is this error comming in PAINT() function of applet? ... Then I can search the paintcode and find which String is searched at ...
    (comp.lang.java.programmer)
  • Re: ********************** R.I.P. Microsoft ********************
    ... That the largest single block of Code was ... MSPaint and the rest was somewhat random. ... MS Paint is more like 332 KB. ... > 658 MB of source code for MS Paint? ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: ********************** R.I.P. Microsoft ********************
    ... >and the majority of files are from Microsoft Paint. ... >dodge some Paint filled balloons..... ... 658 MB of source code for MS Paint? ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Image editor
    ... Try Paint .NET. ... It is a full image editor with complete source code. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How boot FC 5 to plain TTY terminal mode?
    ... mind being heckled for not upgrading ... paint a target on myself). ... from source code and install other things from source, ...
    (linux.redhat)