Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Are there a way to put a Form and a TextBox in one display?  RSS feed

 
anh tuan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, i'm a newbie in Java and also in J2ME. I'm practising in J2ME and i want to write an application in which there are a textfield for phone number, and a textbox for message content. But my book only show me how to put a textfield on a form, then display.setCurrent(form) . Please tell me are there a way to put my Form and TextBox together? And i'm a vietnamese, so don't get mad with my English
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We get lots worse English than that. But a Form is a container for GUI controls, so the TextBox has to go inside a form. So not only is there a way, you actually have to do it that way. Otherwise it won't work!
 
anh tuan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for answering, but i still don't get it. Because Form and TextBox both are extend class of Display, how can i put a TextBox inside a Form. Can you show me some code for example?
 
anh tuan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And i also have a problem in keyPressed. I'm writing a calculator run on mobile, and when i want to catch the key-up pressed event, i found out there're no keycode for that event. There are KEY_NUM0, KEY_NUM1... but no KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT and KEY_SELECT (the key at the center). I tried to use the UP, DOWN,... in game action but it didn't work. Thanks for any help, especially if there are code for example.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!