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 829051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:49:20+00:00 2026-05-15T03:49:20+00:00

How do I implement an image button in BlackBerry?

  • 0

How do I implement an image button in 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-15T03:49:21+00:00Added an answer on May 15, 2026 at 3:49 am

    here you go, complete code:

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.component.ButtonField;
    
    /**
     * Button field with a bitmap as its label.
     */
    public class BitmapButtonField extends ButtonField {
            private Bitmap bitmap;
            private Bitmap bitmapHighlight;
            private boolean highlighted = false;
    
            /**
             * Instantiates a new bitmap button field.
             * 
             * @param bitmap the bitmap to use as a label
             */
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight) {
                this(bitmap, bitmapHighlight, ButtonField.CONSUME_CLICK|ButtonField.FIELD_HCENTER|ButtonField.FIELD_VCENTER);
            }
    
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight, long style) {
                super(style);
                this.bitmap = bitmap;
                this.bitmapHighlight = bitmapHighlight;
            }
    
            /* (non-Javadoc)
             * @see net.rim.device.api.ui.component.ButtonField#layout(int, int)
             */
            protected void layout(int width, int height) {
                    setExtent(getPreferredWidth(), getPreferredHeight());
            }
    
            /* (non-Javadoc)
             * @see net.rim.device.api.ui.component.ButtonField#getPreferredWidth()
             */
            public int getPreferredWidth() {
                    return bitmap.getWidth();
            }
    
            /* (non-Javadoc)
             * @see net.rim.device.api.ui.component.ButtonField#getPreferredHeight()
             */
            public int getPreferredHeight() {
                    return bitmap.getHeight();
            }
    
            /* (non-Javadoc)
             * @see net.rim.device.api.ui.component.ButtonField#paint(net.rim.device.api.ui.Graphics)
             */
            protected void paint(Graphics graphics) {
                    super.paint(graphics);
                    int width = bitmap.getWidth();
                    int height = bitmap.getHeight();
                    Bitmap b = bitmap;
                    if (highlighted)
                        b = bitmapHighlight;
                    graphics.drawBitmap(0, 0, width, height, b, 0, 0);
            }
    
            public void setHighlight(boolean highlight)
            {
                this.highlighted = highlight;           
            }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 496k
  • Answers 496k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer restrict qualifiers are basically a way for the user to… May 16, 2026 at 11:42 am
  • Editorial Team
    Editorial Team added an answer Are you trying to get visitors to old.com/about.htm to go… May 16, 2026 at 11:42 am
  • Editorial Team
    Editorial Team added an answer I have found very nice code in your service: try… May 16, 2026 at 11:41 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need to implement a drop down menu like the one in the image.
I am trying to implement Camera application in android,and i got some code from
I have a button on click of which i want to either show/hide a
I am trying to implement live camera functionality in my iPhone application and am
I'm using jQuery cycle to implement a slideshow effect. You can click on any
Is there a script similar to the image below that lets the user press
i implement FBConnect for my app via UIActionSheet with 2buttons . my buttons are
I have a image in the shape of a Circle. The circle is broken
I've created a custom gallery; however, the Set wallpaper button will not set the
I have an edit button which appears on the page when users have access

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.