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 |