Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 415
Registered: ‎07-28-2010
My Device: 8000
My Carrier: hi

Edit field with password.

[ Edited ]


       I am new in blckberry developer. i am desing loing password screen. i want password edit field with default character " * " . please help me. what is code for that when we enter password edit field it will show only *.



Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: Edit field with password.


PasswordEditField  pwd = new PasswordEditField ();


try the above code


Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: Edit field with password.



swati is correct..


may be you can also improvize and override


class Password extends PasswordEditField
    Password(long style)
        super("", "", 10, style);
    protected void layout(int width, int height)
        width = SizeSpec.PasswordWidth;
        height = SizeSpec.PasswordHeight;
        super.layout(width, height);
        super.setExtent(width, height);
    public void paint(Graphics graphics)
        int labelWidth = getFont().getAdvance(getLabel());
        graphics.drawRect( labelWidth, 0, getWidth() - labelWidth,getHeight());  

feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.