• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

I want to use canvas to read input from key pad!

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to develope text predicting software using j2me,how can I use canvas to read input from mobile key?I face some problems to use text box and text field class.
thanks.
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You question not clear.
But I think in canvas class
there have some method to support key input
for example keypress(int key).
You can check the document of j2me
[ July 08, 2007: Message edited by: Shoumin Li ]
 
Habtamu Aboma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,my question is how can I use Canvas for editing text as an alternative to TextBox and TextField classes?Is there any way in which Canvas is used to develope applications similar to mobile applications for sending message like SMS?
Thanks!
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no text widget provided by Canvas. What you can do is couple your character event handlers with echoing those characters by calling drawString() on the Graphics instance.


[ July 08, 2007: Message edited by: Eduardo Marques ]
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would the Canvas-based widget do that the other text enrty widegets can't? What problems are you encountering using those?
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Canvas can detect key-strokes but does not echo them as a TextField widget.
Thus my suggestion ... I don't think there's any other way if you really want to use Canvas.
 
this llama doesn't want your drama, he just wants this tiny ad for his mama
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic