Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3780830
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:51:54+00:00 2026-05-19T10:51:54+00:00

how to set the position of a button in java blackberry.

  • 0

how to set the position of a button in java blackberry.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:51:55+00:00Added an answer on May 19, 2026 at 10:51 am

    You can position a button or any other component on a screen by creating a Manager class and overriding the sublayout() method. A Manager is kind of like a Panel in java i.e an area of the screen you can add components to. In the sublayout() method you should

    1. set the size of the component with layoutChild()

    2. set the position of the component with setPositionChild()

    3. Set the overall size of the Manager with setExtent()

    something like

        button = new ButtonField();
    
        HorizontalFieldManager manager = new HorizontalFieldManager(){
            protected void sublayout(int width, int height) {
                int buttonWidth = button.getPreferredWidth();
                int buttonHeight = button.getPreferredHeight();
                layoutChild(button,buttonWidth, buttonHeight);
                setPositionChild(button, 0, 0);
                setExtent(width, height);
            }
        };
        manager.add(button);
    

    You can override getPreferredWidth() and getPreferredHeight() for your button if you want to specify a certain width and height.

    See

    Custom layout Manager

    Manager class

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to place a button. I have its position set to absolute, so
How one can set the start position of media when play button of element
How can I as easy as possible set the position of my Button to
I am trying to absolutely position a TinyMCE editor at a set position using
I have imageView in activity. How I can set position this imageView in my
i'm having the following markup using 2 divs. the #child div has set position:absolute;
how can i set div position at the center of the page with size,
How can I manually set a position with some code? Ok Ive got some
I'm Student with EXTJS4.. I added Ext.Img to AbsolutePanel, and I set the Position.
I'm trying to set the caret position in a contenteditable div layer, and after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.