I am getting this... I want the below image
I am newbee in Blackberry.
I want to give thick border to the rounded button field in my application.
Below is my code.
I have created a CustomBasicEditField class.
protected void paint(Graphics graphics)
{
int x = (this.getWidth() - getFont().getAdvance(text)) >> 1;
int y = (this.getHeight() - getFont().getHeight()) >> 1;
graphics.setColor(backgroundColour);
graphics.fillRoundRect(0, 0, fieldWidth, fieldHeight, 40, 40);
graphics.setColor(border_color);
graphics.setStrokeWidth(5);
graphics.drawRoundRect(0, 0, fieldWidth, fieldHeight, 40, 40);
graphics.setColor(0x2bb1ff);
graphics.setFont(myFont);
graphics.drawText(text, x, y);
super.paint(graphics);
}
If I make drawRoundRect(0,0,fieldWidth, fieldHeight, 0, 0), then it prints a square with thick border.
But I don't want a square. When I keep the above code, it does create a rounded edit box but a thin border.
Thanks in advance.
Try this code:
I got like this: