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

New Developer
New Developer
Posts: 15
Registered: ‎12-03-2009
My Device: Not Specified

switching between screens



I having totally three screen.


from first to second screen is possible and second to third screen also possible.


But, is it possible to comeback from three to first screen directly.



Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: switching between screens

I guess you could pop the 1st screen, then repush it.


Understand that the screen handling is a stack-based structure in Blackberry. When you push ScreenA,  then push ScreenB, ScreenA is still "alive", just not currently displayed. When you pop ScreenB, ScreenA is now displayed for you, since it is the "top" display on the stack.


Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

Re: switching between screens

[ Edited ]

Just to elaborate a bit on RexDoug's reply: the display stack isn't a stack in the same sense as a Stack data structure. In particular, you can "pop" screens that are not on top of the stack. What RexDoug is suggesting is that you can check, using isDisplayed(), whether a screen is already on the display stack, pop it if necessary, and then push it onto the stack where it will become the top visible screen.


Isn't this a repeat of the question in this thread?

Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.