This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 105109 - Clear the default text in a TextBox in a userfriendly way
Summary: Clear the default text in a TextBox in a userfriendly way
Status: RESOLVED INVALID
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@mobility
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 10:41 UTC by dverdouw
Modified: 2007-05-30 10:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dverdouw 2007-05-30 10:41:59 UTC
I have a mobile application witch holds a Form with a TextBox. When this Form 
loads the TextBox is filled with a default value. The user can change the 
default value to the value he wants. 
I have a problem with this. When the Form loads the input position is in front 
of the text in the TextBox, so the user is not able to directly enter the new 
value he wants. He first needs to change the input position in the Textbox to 
the end. Only then he will be able to clear the default value in the Textbox 
and enter the value he wants.
Is there a possibility to change this, so the user will be able to overwrite 
the initial default value. Or maybe there is a possibility to set the 
inputposition of the TextBox to the end of the TextBox (behind the last 
character) so the user can clear the default value immediately without first 
moving the input position to the end of the TextBox? 
I already have found the function getCaretPosition(). With this function it is 
possible to get the current inputposition of the TextBox. But I cannot find the 
function setCaretPosition(), witch would be the function I need.

Please, help me out.
Thanks
Comment 1 David Kaspar 2007-05-30 10:57:47 UTC
This is a device/emulator specific behaviour. The J2ME specification says that.
There is no way how NetBeans can change it since the MIDP API does not allow
that - there is no setCaretPosition like method in the API.