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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:24:51+00:00 2026-05-31T07:24:51+00:00

Currently I have 4 bitmap buttons in my application. I want to have something

  • 0

Currently I have 4 bitmap buttons in my application. I want to have something like Label/Name for each of the buttons so that whenever someone focus on the particular button, the name appears somewhere on the screen. It could be on top, below the buttons or anywhere will do.

How can I do this? I tried searching for bitmap button field labelling but I found nothing really helpful.

  • 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-31T07:24:52+00:00Added an answer on May 31, 2026 at 7:24 am

    you can put a CustomLabelField below button fields. Override your ButtonFields onFocus(int direction) and onUnfocus() methods. Inside them invoke setLabel(String label) method of your CustomLabelField

    class CustomLabelField extends Field {
        String label;
        public void setLabel(String label){
            this.label = label;
            invalidate();
        }
        protected void layout(int arg0, int arg1) {
            setExtent(Display.getWidth, getFont().getHeight());
        }
    
        protected void paint(Graphics graphics) {
            graphics.setColor(Color.Black);
            graphics.drawText(label, 0, 0);
        }
    }
    

    EDIT (after comments)

    You can use this custom button and add your additional features in it. I did not try if this is working, but should work.

    import net.rim.device.api.ui.component.BitmapField;
    import net.rim.device.api.ui.container.MainScreen;
    
    public class CustomButtonField extends BitmapField{
        private String label = "";
        private MainScreen yourScreen;
    
        public CustomButtonField(String label, MainScreen yourScreen) {
            super();
            this.label = label;
            this.yourScreen = yourScreen;
        }
    
        protected void onFocus(int direction) {
            yourScreen.setTitle(label);
            super.onFocus(direction);
        }
    
        protected void onUnfocus() {
            yourScreen.setTitle("");
            super.onUnfocus();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android application that is very image intensive. I'm currently using Bitmap.createScaledBitmap()
i currently have a class that uses bitmap. however it is not serializable due
I have a form that is loaded with a generated bitmap. I want the
Currently have password protection on my main and sub directories, however I'd like to
I currently have a MySQL database that I am accessing using PHP. You search
I currently have the below code, but obviously I am not that skilled on
I currently have a handler that when navigated to prompts the user to download
I currently have a simple list view adapter that holds two rows of text.
I have a database of names of people that has (currently) 35 million rows.
I am currently implementing a method that accepts two bitmap objects. We can assume

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.