Is it possible for me to draw lines and shapes on canvas and also use components or custom components on the same Canvas, Can the MIDP2.0 api achieve this?
Is it possible for me to draw lines and shapes on canvas and also use components or custom components on the same Canvas, Can the MIDP2.0 api achieve this?
No, Canvas is not a "container" for other components. It provides a low-level user interface (drawing, painting, key presses, screen touches, etc.).
That said, you can create your own component model, by creating a custom subclass of Canvas to act as a container. This is what the LWUIT library does. Obviously, it's a bit of work to build something like this...
Graham.
Kevin, directly give LWUIT a try... it works in a similary pattern, where you hace Canvas as a container on which you place all highlevel custom components which are all extendable (i.e. you can overwrite their paint() and other methods if required).Is it possible for me to draw lines and shapes on canvas and also use components or custom components on the same Canvas, Can the MIDP2.0 api achieve this?
thanks,
~Amitabh
@Amitabh
@Graham
I have had it look at LWUIT and J2MEPolish, these seem to be heavyweight, and at this point of time I wouldn't want to construct my own UI library either.
Is there any 3rd party UI library based on canvas that supports container-component architechture and also allows me to work with primitives like line, arc etc.
I found MWT seems to be lightweight with a container implementation, any better ones out there?