Using GameCanvas for tiled layers

Hello, I am trying to use game canvas to create a 2D world that a player can walk through, although I get this error at compile time:

Building "Scroller"

C:\WTK2.5.1\apps\Scroller\src\ScrollCanvas.java:8: GameCanvas(boolean) in javax.microedition.lcdui.game.GameCanvas cannot be applied to ()

class ScrollCanvas extends GameCanvas

This is at the top of my code:

import java.io.*;

import javax.microedition.lcdui.*;

import javax.microedition.lcdui.game.*;

import java.util.Random;

class ScrollCanvasextends GameCanvas

{

Cheers anyone

[830 byte] By [John4938a] at [2007-11-27 8:09:18]
# 1

> Hello, I am trying to use game canvas to create a 2D

> world that a player can walk through, although I get

> this error at compile time:

>

> Building "Scroller"

> C:\WTK2.5.1\apps\Scroller\src\ScrollCanvas.java:8:

> GameCanvas(boolean) in

> javax.microedition.lcdui.game.GameCanvas cannot be

> applied to ()

> class ScrollCanvas extends GameCanvas

>

> This is at the top of my code:

>

> > import java.io.*;

> import javax.microedition.lcdui.*;

> import javax.microedition.lcdui.game.*;

> import java.util.Random;

>

> class ScrollCanvas extends GameCanvas

> {

>

>

> Cheers anyone

Can you show the line of the code where the error occurs?

Best bet is that you're not passing the boolean parameter

to the GameCanvas constructor.

Edit:

Check out the API:

http://www.wmlscript.it/j2me/api20/javax/microedition/lcdui/game/GameCanvas.html#GameCanvas(boolean)

Message was edited by:

Danniel_Willian

Danniel_Williana at 2007-7-12 19:52:16 > top of Java-index,Java Mobility Forums,Java ME Technologies...