BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 09-10-2008, 11:45 AM   #1 (permalink)
Thumbs Must Hurt
Join Date: Oct 2007
Model: 7100i
Carrier: Dont know
Posts: 195
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Doubt on paint method

Please Login to Remove!


I want to draw a rectangle on the mainscreen when i click a menu item given on the page. What i know is we can draw anything on the mainscreen by putting our code in the paint method of the mainscreen. But what i dont know how will i make the recttangle appear when i click the menu item.

Can anybody explain me.

Thanks in advance..
Old 09-10-2008, 01:20 PM   #2 (permalink)
Thumbs Must Hurt
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts


In your MainScreen subclass (you are subclassing MainScreen, right?), call


when you want to cause a "screen refresh" event that will cause your Screen's paint() method to be executed.


Karl G. Kowalski
Owns a RAZR
Develops for BlackBerry
So next phone will iPhone 3G!

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.