Hi, I'm quite new to J2ME graphics and I wonder about the following:
If I understand correctly Canvas can do every thing that Form can and more, so why should I use Form at all?
Printable View
Hi, I'm quite new to J2ME graphics and I wonder about the following:
If I understand correctly Canvas can do every thing that Form can and more, so why should I use Form at all?
Because it handles all the input and formatting onto the screen for you, which can be a lot of effort if you're developing a midlet that will be used on different handsets that have different screen resolutions.
You'd also have to implement your own code to trigger the commands that the Form supports.
Of course using Canvas gives you more control, but for when you just want a simple screen to display information or choices, then it's a very easy path to use.
Thanks for your answer.
Do you mean that when using drawStirng method on the Graphics class, the text will not wrap but will exit the screen?
Yep, and it's tricky to solve as you need to take into account loads of different variables including screen size, font size, font spacing between letters, non-standard character sets eg chinese...