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

Posts: 24
Registered: ‎01-27-2011
My Device: Not Specified

MyScreen kepps in background. Requires a second click to appears.



I have a problem with an application. My app initially calculates a series of data using another code that I have as a library. The problem is that when I start the app this works properly on background but I need to press another time the icon to watch the screen painted. It's like going to the library didn't know re-applying the graphics or those kepps in the background.


This is about my structure:



public class MyApp extends UiApplication{
    public MyApp() {
        MyScreen ms = new MyScreen(); 
        ms.retrieveData(); //goes to MyScreen class and uses library methods
        ms.drawContent(); //goes to MyScreen class and constructs the graphic content

public final class MyScreen extends MainScreen implements ListFieldCallback{
    public MyScreen() {
        LabelField title = new LabelField("MyApp", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH); 
     public void retrieveCerts() { 
         // library calls

     public void drawContent() {
         // screen contruction
         LabelField lf = new ...


Can yo imagine the situation? what my problem is?


Anybody can help me?


Thank you very much.


Posts: 102
Registered: ‎07-26-2011
My Device: Not a blackberry user
My Carrier: None

Re: MyScreen keeps in background. Requires a second click to appears.

[ Edited ]



First of all, are you doing that data search in a separate thread?


To do non GUI processes in the event thread cause certain GUI blocking which, in your case, can be happening.


If your answer to the starting question was no, please visit the links provided.


I hope this help. Let me know about your progress with this issue.


Good luck.

Let me know if this was helpful or if you have a solution.

Johan Guzmán - In case my answer pleased you, give a press to the LIKE button, please!! Mark this post as solution if it solved your problem.