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

  • Home
  • SEARCH
  • 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 3342078
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:47:47+00:00 2026-05-18T00:47:47+00:00

I am trying my hands at developing my first screen for Blackberry with JDE4.2.1.

  • 0

I am trying my hands at developing my first screen for Blackberry with JDE4.2.1.
The layout I am trying to create looks like this:

---------------------------------
!   Header img                  !
!-------------------------------!
! I  !         Title            !
! M  !--------------------------!
! G  !  Body Txt                !
!    !                          !
!    !  Button1 Button2         !
!    !--------------------------!
!    !      Footer text         !
---------------------------------

So far I have managed to achieved this layout with a combination of Horizontal and VerticalFieldLayout and the code look like this:

class MyScreen extends MainScreen {

    RadioButtonGroup _optionGroup = new RadioButtonGroup();
    Manager _sideBarHzMgr = new HorizontalFieldManager();
    Manager _bodyContentMgr = new VerticalFieldManager();

    public MyScreen(String label) {
        super();
        doHeader(label);
        doBody();
        doFooter();
    }

    void doHeader(String label) {
        setTitle(new LabelField("Application v1.0.1", LabelField.ELLIPSIS));

        Bitmap headerImg = Bitmap.getBitmapResource("header1.jpg");
        headerImg = cropBitmap(headerImg, Display.getWidth(), headerImg.getHeight());
        add(new BitmapField(headerImg));

        Bitmap sidebar = Bitmap.getBitmapResource("sidebar.jpg");
        sidebar = cropBitmap(sidebar, sidebar.getWidth(), Display.getHeight());
        BitmapField bf = new BitmapField(sidebar, BitmapField.NON_FOCUSABLE);

        _sideBarHzMgr.add(bf);

        //Add the screen label to the main body layout
        RichTextField rtf = new RichTextField(label, new int[] { 0, label.length() }, new byte[] { 0 },
                new Font[] { Font.getDefault().derive(Font.BOLD) }, RichTextField.TEXT_ALIGN_HCENTER
                | RichTextField.NON_FOCUSABLE);
        _bodyContentMgr.add(rtf);


    }

    void doBody() {
                RadioButtonField rbField1 = new RadioButtonField("Option1", _optionGroup, true,
                        RadioButtonField.FIELD_LEFT);
                RadioButtonField rbField2 = new RadioButtonField("Option2", _optionGroup, false,
                        RadioButtonField.FIELD_LEFT);

                super._bodyContentMgr.add(rbField1);
                super._bodyContentMgr.add(rbField2);

                //Center the buttons in body content area horizontally
                HorizontalFieldManager hfm = new HorizontalFieldManager(Manager.FIELD_LEFT);
                hfm.add(_closeButton);
                hfm.add(_contButton);

                super._bodyContentMgr.add(hfm);
    }

    void doFooter() {
        _bodyContentMgr.add(new LabelField());
        _bodyContentMgr.add(new SeparatorField());
        _bodyContentMgr.add(new RichTextField("©MyCo footer 2010.", RichTextField.TEXT_ALIGN_HCENTER
                | RichTextField.NON_FOCUSABLE | RichTextField.FIELD_BOTTOM));
        //Finaly add the layout managers to the main screen
        _sideBarHzMgr.add(_bodyContentMgr);
        add(_sideBarHzMgr);
    }
}

The problem is that when I add the Screen title to the VerticalLayoutManager (bodyContentMgr) and try to center it, it ends up overflowing the screen physical size on on the right. Nevermind the number of characters in the title or footer.
It seems that the manager virtual size is double the screen size for some reason.

Is there anyway I can limit the virtual size of the bodyContentMgr to be the screen physical size?

Result:

---------------------------------
!   Header img                  !
!-------------------------------!
! I  !                         Title                 !
! M  !-----------------------------------------------!
! G  !  Body Txt                                     !
!    !                                               !
!    !  Button1 Button2                              !
!    !-----------------------------------------------!
!    !                    Footer text                !
--------------------------------!
  • 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-18T00:47:48+00:00Added an answer on May 18, 2026 at 12:47 am

    The VerticalFieldManager had some significant bugs fixed in JDE5.0, so you might try your layout with a 5.0 simulator, to see if the problem goes away. If it does, then it’s an issue of working around the bug, rather than some fundamental problem with your layout.

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

Sidebar

Related Questions

I just started trying my hands on EF4 code first this morning and I
I am trying my hands on Visual Studio 2010 (Asp.Net 4.0) for the first
I am trying to get my hands dirty learning DDD (by developing a sample
so I'm trying my hand at android developing this summer. I was trying to
I am just trying my hands at three.js. This is the link: https://github.com/mrdoob/three.js/ But
I am not very comfortable using javascript so trying my hands to use this
I'm trying my hand at developing an app for Blackberry Playbook (Yes, I know,
I'm trying my hand in the food industry. I'm going to be developing my
So I'm trying my hands at a css menu and I have a simple
Lately I have been trying my hands on Eclipse IDE for java development. I

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.