BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 08-19-2009, 09:51 AM   #1 (permalink)
New Member
Join Date: May 2009
Model: 8310
Carrier: China Mobile
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default MIDlet TextField - how to fix this?

Please Login to Remove!


I'm creating a J2ME MIDlet TextField as usual, though on BlackBerry devices (the main target, though it needs to run on other devices as well), I can't get the UI as desired.

What I'm trying to do is supposed to be simple, but I can't find a solution.

I want the TextField to have a border around it (there is a method called setBorder, but it's private) and I don't want to allow multiline input (there's a property called multiline, but again it's private).

Can someone please give some suggestion?


Old 08-21-2009, 01:03 AM   #2 (permalink)
Thumbs Must Hurt
shraddha294's Avatar
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts

I presume you are using javax.microedition.lcdui.TextField and not the RIM UI APIs. The J2ME API does not allow drawing border around the textfield.
You can do some fancy stuff with TextField using the net.rim.device.api.ui.component.TextField like adding focus etc. But no border can be set.

If you want some more custom things to be added maybe consider creating Custom field.

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.