I just changed SurfaceLayer surf to ImageLayer imglay, removed all the code from paint() and replaced code in init() to this:
imglay = g.createImageLayer();
imglay.setImage(circle);
g.rootLayer().add(imglay);
It works, but is it how it should be done?