1

I am new to j2me. I am developing a mobile application in j2me. Is there a way of adding a canvas object to the background of a form? I tried searching in net with few people suggesting to use "jmepolish". I have no idea what jmepolish is..Is there a way to do this with normal j2me classes?

gnat
  • 6,213
  • 108
  • 53
  • 73

1 Answers1

2

No there's no way to do this. A J2ME form has very limited levels of customisation.

In order to make a fancy looking form that looks exactly as you want, you need to use the Canvas class; this involves doing everything else yourself, i.e. drawing your own input widgets, managing your own user interaction, including scrolling, and any touch screen/gesture stuff if your device supports it.

You can use libraries like J2ME Polish that will do that for you, but even then you will be constrained by what that library supports; and there is an overhead for including the library in your midlet.

funkybro
  • 8,432
  • 6
  • 39
  • 52
  • So do i need to use canvas class even for displaying an image in the background of the form? – Harish Pendela Jan 28 '13 at 10:55
  • The best thing to do is to visit the Form class documentation at http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/lcdui/Form.html -- the absence of a `setBackgroundImage` method means you can't do it. – funkybro Jan 28 '13 at 11:01
  • ohkk..Thanks a lot for the answers. Can i use CustomItem class to provide basic visual appearance such as color,font,images since my application doesn't need any complex graphics.. – Harish Pendela Jan 28 '13 at 11:03
  • That will allow you to customise the appearance of individual items within your form, but not of the form itself. – funkybro Jan 28 '13 at 12:51