12-13-2010 09:14 PM
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.setColor(0x333333);
graphics.fillRoundRect(0, 0, getWidth(), getHeight(), 12, 12);
graphics.setColor(0xffffff);
graphics.drawRoundRect(0,0, getWidth(), getHeight(), 12, 12);
}
Thanks
Scientific