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: 90
Registered: ‎06-04-2010
My Device: Blackberry 9630
My Carrier: verizon

Improve my custom screen look

Hello, I have a custom screen that I making popup on top of my other screen.  I would like to make this custom screen a box with rounded corners but when I try my code it always comes out more square looking.  How can I make this more rounded looking?


Here is my code for the layout and paint method:


         protected void sublayout(int width, int height)
		layoutDelegate(width - 60, height - 60);
		setPositionDelegate(0, 10);
		setExtent(width - 60, Math.min(height - 60, getDelegate().getHeight() + 10));
		setPosition(30, (height - getHeight())/2);
	protected void paintBackground(Graphics graphics)
		graphics.fillRoundRect(0, 0, getWidth(), getHeight(), 12, 12);
		graphics.drawRoundRect(0,0, getWidth(), getHeight(), 12, 12);