I am beginner in codenameone. I have task assigned that draws anything[not rectangles or any shapes] on screen. Anything means It could be anything with fingers. Like android has gesturelayout where you can draw anything on surface.
I have seen some forums that said I should derive the container and override paint method. That never led me to anything. Even the tutorial guide just goes through steps.I won't some working examples or any link where i can find some suitable material.
Did you read the developer guide: http://www.codenameone.com/developer-guide.html
JavaDocs: https://codenameone.googlecode.com/svn/trunk/CodenameOne/javadoc/index.html
You should derive component and override paint, notice this code is really bad since it doesn't eliminate duplicates or do anything clever: