Re: What wrong? (Compiler error message)
From: Dan (fergusprint_at_casino.com)
Date: 11/29/03
- Next message: Jose Rubio: "Re: communication between applet in user machine with application in server"
- Previous message: Chris Smith: "Re: ICQ"
- In reply to: Jose Rubio: "Re: What wrong? (Compiler error message)"
- Next in thread: Roedy Green: "Re: What wrong? (Compiler error message)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Jose Rubio: "Re: communication between applet in user machine with application in server"
- Previous message: Chris Smith: "Re: ICQ"
- In reply to: Jose Rubio: "Re: What wrong? (Compiler error message)"
- Next in thread: Roedy Green: "Re: What wrong? (Compiler error message)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|