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: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

editfield start writing from 5 px left

I want my basic ediefield to start writing 5px from left


final BasicEditField answer = new  BasicEditField("","")
            public void paint(Graphics g) {
                //g.drawRect(0, 0, getWidth(), getHeight());
       // answer.setPadding(5, 5, 5, 5);
        answer.setBorder (BorderFactory.createSimpleBorder(new XYEdges (2, 2, 2, 2)));



write now it writes starting stuck to the border.

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: editfield start writing from 5 px left

Can you show us a screen shot of the problem?


What OS level are you developing on and what Simulators have you tested this on?


Why are you overriding paint?