I am new to J2ME. I just want to know how to put a textfield over a background image. I tried canvas but I can only set the background image and don't know how to add a textfield above the background image. Please help me.
Asked
Active
Viewed 1,781 times
0
-
I suggest you to use LWUIT , it permits to set Form's background image and also add items into the Form. – pheromix Dec 13 '11 at 05:36
-
Thanks pheromix.. I will try LWUIT. I will just need to read about it since i don't know LWUIT.. Thanks for the suggestion.. – Dudu Dec 15 '11 at 01:25
-
@gnat.. Thanks gnat for the edit.. – Dudu Dec 15 '11 at 01:55
1 Answers
2
APPROACH I: Using high level api's like Screen, Item, etc
It is NOT feasible in Java ME (CLDC) using high level api's like screens, items, etc are laid out on the display with default device styling and without the extensive layout support like Swing
.
APPROACH II: Using low level api's like Canvas
To use the low level api's you need to create custom components like in J4ME. In their you layout the Canvas and paint the components on the top. So in your case you can render the image of the size of Canvas and then render the components on top of it.
NOTE:
Please keep in mind this a very tedious and not so rewarding process.
APPROACH III: Use third party library
- High Rated UI libraries: LWUIT and J2ME-Polish
- SO: JavaME UI Libraries