View Single Post
Old 01-14-2007, 09:14 AM   #7 (permalink)
Knows Where the Search Button Is
Join Date: Jun 2005
Model: 7290
Carrier: Cingular
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts

I had the same problem in an app I'm working on. I had to physically code the index into the setRolloverIcon method. I have two icons. s1.png and s2.png. s1.png is defined in my project settings.

public static void main(String[] args) {

if ( args != null && args.length > 0 && args[0].equals("gui") ) {
// start the gui
else {
try {
Bitmap icon = Bitmap.getBitmapResource("s2.png");
HomeScreen.setRolloverIcon(icon, 1);

catch( Exception e ) {

// enter the event dispatcher

The reason for the swallowed try/catch is that this is actually supposed to be executed when the blackberry fires up. Since you'll be deploying your app while blackberry is already running, there's a good chance this method will throw an exception.

Hope that helps,
-- Jason