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

Trusted Contributor
Posts: 204
Registered: ‎07-14-2010
My Device: 8100
My Carrier: Blackberry developer
Accepted Solution

add logo to my application

hi all ,


    i need to display an image as logo at the top pf my screen, and below that i should have the


 i just need to know how to add image .

can anyone help ?

Posts: 468
Registered: ‎08-07-2009
My Device: Curve, Bold, Storm
My Carrier: Blackberry Developer

Re: add logo to my application


EncodedImage company_icon  = EncodedImage.getEncodedImageResource("front_logo.png");
        company_icon = Utility.ScaleImageToSize(company_icon,40,40);
        company_logo = new BitmapField(company_icon.getBitmap(), BitmapField.NON_FOCUSABLE);
        EncodedImage company_title  = EncodedImage.getEncodedImageResource("front_title.png");
        company_title = Utility.ScaleImageToSize(company_title,198,40);
        company_logoTitle = new BitmapField(company_title.getBitmap(), BitmapField.NON_FOCUSABLE);

        Company_icon_HFM = new HorizontalFieldManager()
            protected void sublayout(int width,int height)
                layoutChild(company_logo, getPreferredWidth(), getPreferredHeight());
                layoutChild(company_logoTitle, getPreferredWidth(), getPreferredHeight());





You can to the above code.


and add above manager.

feel free to press the kudos button on the left side to thank the user that helped you.
please mark posts as solved if you found a solution.
Posts: 22
Registered: ‎06-02-2010
My Device: 8330
My Carrier: Rogers & Bell

Re: add logo to my application

Add the logo.gif image to your project using Import.



then add this line to the Screen before adding other elements.


add(new BitmapField(Bitmap.getBitmapResource("logo.gif")));

Trusted Contributor
Posts: 204
Registered: ‎07-14-2010
My Device: 8100
My Carrier: Blackberry developer

Re: add logo to my application

[ Edited ]

thanks it worked ..