Welcome!

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

Reply
New Developer
Posts: 24
Registered: ‎07-23-2008
My Device: Not Specified

Displayable.getWidth returning zero on OS 4.1

Hi,

 

I have a subclass of javax.microedition.lcdui.Form that is calling getWidth inside its constructor.  On OS 4.1, tested with emulator and device, this is returning zero, even though the docs state 'This method returns the proper result at all times, even if the Displayable object has not yet been shown.'. It works fine on 4.2.2 and up. Is this a known bug? Any pointers for a workaround?

 

Cheers