BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-31-2009, 01:37 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Running In Backgroud - Screen not displaying

Please Login to Remove!

Hello Everyone

I have follow piece of code. I am trying to run the application in background. But, the application screen does not show up.

Any ideas why?


Thanks

-------------------------- Code -----------------------
public class MainMenu extends UiApplication

{
public static final long ID = 0x11abf355285f9019L;
public static void main(String[] args)
{

RuntimeStore appReg = RuntimeStore.getRuntimeStore();

synchronized(appReg)
{
if (appReg.get(ID) == null)
{
appReg.put(ID, new MainMenu());
Application application = (Application)appReg.waitFor(ID);
application.enterEventDispatcher();
}
else
{
Application application = (Application)appReg.waitFor(ID);
application.requestForeground();
}


}

}


public MainMenu()
{
//display a new screen
pushScreen(new MainMenuScreen());
}
}


final class MainMenuScreen extends MainScreen
{

public MainMenuScreen()
{
super();
Background b1 = BackgroundFactory.createSolidBackground(Color.SKYB LUE);
LabelField lblTitle = new LabelField("Test",LabelField.USE_ALL_WIDTH);
lblTitle.setBackground(b1);
lblTitle.setFont(getFont().derive(Font.BOLD));

}
public boolean onClose()
{
System.exit(0);
return true;
}

}

---------------------- End Of Code ------------------------------
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

AVX 04023J0R4PBSTR CAPACITOR CERAMIC 0.4PF, 25V, 0402 0.02pF (100 pieces)
$215.33
AVX 04023J0R4PBSTR CAPACITOR CERAMIC 0.4PF, 25V, 0402 0.02pF (100 pieces) picture CERAMIC ELECTRONIC ASSY PLATES 2+ LB LOT
$120.0
 CERAMIC  ELECTRONIC ASSY PLATES    2+ LB LOT    pictureDWYER MAGNEHELIC GAUGE NEVER INSTALLED
$32.0
DWYER MAGNEHELIC  GAUGE     NEVER INSTALLED   pictureAVX 06035A8R2CAT2A CAP, CERAMIC, 8.2PF, 50V, C0G/NP0, 0.25PF, 0603 (1000 pieces)
$87.21
AVX 06035A8R2CAT2A CAP, CERAMIC, 8.2PF, 50V, C0G/NP0, 0.25PF, 0603 (1000 pieces) pictureAluminum Electrolytic Capacitors - Snap In 680uF 250V 20% 105C (100 pieces)
$528.93
Aluminum Electrolytic Capacitors - Snap In 680uF 250V 20% 105C (100 pieces) picture






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