canvas = new InternalCanvas3D(device.getBestConfiguration( this.template), this);
canvas = new InternalCanvas3D(this.graphicsConfig, this);
    void createCanvas(int width, int height) {        if (getParent() == null) {            return;        }        if (null != canvas) {            // i had a canvas, i need to check if i really need to change it            if ((width != canvas.getWidth()) || (height != canvas.getHeight())) {                if ((null != canvas.getOffScreenBuffer()) &&                        (null != canvas.getOffScreenBuffer().getImage())) {                    canvas.getOffScreenBuffer().getImage().flush(); // flushing so that eventual resources are freed.                }            } else {                return;            }        } else {            // no canvas, i have to create it.            canvas = new InternalCanvas3D(device.getBestConfiguration(                        this.template), this);        }        createOffScreenBuffer(width, height); // whatever happened right above, i need to create the offscreen buffer.    }