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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Regular Contributor
Posts: 90
Registered: ‎09-16-2010
My Device: Not Specified

position popup screen

i have a screen with a label field, on the click of the label field i push a popup screen

now this popup screen appears at the center of the screen,  however i want to change the position of the popup screen

Please help..


my popup screen is as below


class PopUpScreen extends PopupScreen {
	public PopUpScreen)
	super(new HorizontalFieldManager() {
	public int getPreferredWidth() {
		return Display.getWidth() / 3;

	public int getPreferredHeight() {
		return Display.getHeight();
	add(new LabelField("Select SMS Provider"));


Posts: 147
Registered: ‎08-27-2010
My Device: 9800
My Carrier: airtel

Re: position popup screen

[ Edited ]

add this method..



 protected void sublayout(int width, int height) {
     super.sublayout(width, height);
     setPosition(x, y);



and set x & y co ordinates.


Edit:  is right there is no need of setExtent.

Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: position popup screen

You don't need to setExtent in sublayout override - super.sublayout does that for you.

If you ever need to change the screen's position on some event - change your x and y and invoke updateLayout().

please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!