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

BlackBerry® World™ Development

Reply
Highlighted
New Contributor
Posts: 5
Registered: ‎11-24-2011
My Device: 9930
My Carrier: vodafone

ObjectChoiceField's super.paint crashing.

I am using following code to change the font color of a ObjectChoiceField. 

 

ObjectChoiceField ncf = new  ObjectChoiceField("My Choice",items,initialIndex)
        {
            public void paint(Graphics g)
            {

                 int foreColor = Color.WHITE;

                g.setColor(foreColor);
                super.paint(g);
            }
        };

 

 

I compiled this application on JDE 4.5, And it runs fine on all 4.5 simulators. But it throws java.lang.IllegalArgumentException on Blackberry 9930 generic simulator at super.paint(g).
But similar code works in other screen. If I put super.paint(g) in a try catch block, then it will not crash but it wont paint ObjectChoiceField properly.  I am also attaching the call stack.

Could any one please help me to fix this issue?

 

Developer
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: ObjectChoiceField's super.paint crashing.

Please ask this question in Java Development forum

 

http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry