开发者

how to add a textBox and a TextField to a form in j2me

开发者 https://www.devze.com 2023-02-13 07:35 出处:网络
i want to display both TextBox and TextField on the screen at a time but i am unable to add TextBox to form. is开发者_JAVA技巧 there any way to display both of them at a time. that is textBox at the t

i want to display both TextBox and TextField on the screen at a time but i am unable to add TextBox to form. is开发者_JAVA技巧 there any way to display both of them at a time. that is textBox at the top and TextField below it. plz help me. i will be pleased if any code is given

thank u in advance


A TextBox is a Screen, not an Item, therefore you cannot add it to a Form, and there is no way to display both of these things on screen at once.

If you want to display some additional text on screen while a TextBox is active, you can use its title (via setTitle()), or you could scroll it across the top using setTicker().


I guess, you must write you own TextBox component. It must extend Canvas. And you must paint it yourself, using drawLine, drawString.

0

精彩评论

暂无评论...
验证码 换一张
取 消