×

Discussion Board

Results 1 to 4 of 4

Thread: Canvas VS. Form

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    184

    Canvas VS. Form

    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?

  2. #2
    Regular Contributor
    Join Date
    May 2003
    Posts
    151
    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.

  3. #3
    Regular Contributor
    Join Date
    Apr 2003
    Posts
    184
    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?

  4. #4
    Regular Contributor
    Join Date
    May 2003
    Posts
    151
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×