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

Screen.invalidate() does not cause a subsequent call to paint()

by Retired ‎02-16-2010 03:32 PM - edited ‎09-16-2010 02:43 PM (2,007 Views)



This article applies to the following:

  • BlackBerry® smartphones running BlackBerry® Device Software 4.6
  • SDR210700





When you call invalidate() from within the paint method of a class that extends the Screen class, the screen is not repainted.




When called from the paint method, invalidate() does not add a paint request to the event dispatch queue.




This is a previously reported issue that has been escalated internally to our development team. No resolution time frame is currently available.



To get the screen to repaint, you can embed a call to invalidate() within a new runnable object and pass that object to the UiApplication.getUiApplication.invokeLater(..) method, as shown in the following example:



public void paint( Graphics g ) {
   // do drawing

   // use invokeLater(..) to call our invalidate() method
   UiApplication.getUiApplication().invokeLater( new Runnable()
         public void run() {
      }, 1, false


Users Online
Currently online: 13 members 659 guests
Please welcome our newest community members: