i'm new to j2me, i have a simple question. I read about High-User interface and low user interface and found no solution to get only one char from the user input. for example: is it possible to get 'b', if the button '2' was pressed twice? do i have to use a Form? Can i use a form without showing the form?
1. You could use a textbox and set the maxSize of it to 1, so the user can only enter one charachter or digit. 2. You could use a Form containing a TextField, and change it's properties similarly to get one charachter or digit from the user.
But those will both be displayed on the screen. If you want to do it without the user seeing what's going on, you could...
3. Use a Canvas, utilising it's KeyPressed(int keyCode) method that detects when a key has been pressed. Canvas is a bit more difficult to use, but gives you loads of control.
posted 13 years ago
Thanks, i did it like 3.
Do not threaten THIS beaver! Not even with this tiny ad:
Thread Boost - a very different sort of advertising