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

The Archive Base Latest Questions

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

I need to: 1) create long list of BitmapFields and 2) add them to

  • 0

I need to: 1) create long list of BitmapFields and 2) add them to the screen. Since list is long I want to use some short automated method like Loop or similar:

while (i < 1000)
 {
 i = i + 1;
 myBitmapField[i].setBitmap(Bitmap.getBitmapResource("picture" + i+ ".png"));
 myVerticalFieldManager.add(_myBitmapField[i]);
 }

But it seems that I cannot assign a index i to a name of BitmapField myBitmapField[i], only to a name of the file itself.

So how can I create a long list of BitmapFields ? Can i use List, Array, HashMap, or HashSet for this purpose? An example welcome. Thanks a lot! (Blackberry, Java)

  • 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-23T07:51:30+00:00Added an answer on May 23, 2026 at 7:51 am

    If you’re getting that error, that just means that myBitmapField isn’t declared as an array type. You’ll want to declare it as an array, e.g:

    BitmapField[] myBitmapField = new BitmapField[1000];
    for (int i = 0; i < 1000; i++) {
        myBitmapField[i] = new BitmapField();
    }
    

    You could in principle use any of the data types you listed, though only an array can be indexed with the [...] syntax. You just have to change the declaration initialization to use whatever data type you want. And if you use a type that doesn’t support indexes you’ll have to change your index to use the .get method on the data type you choose. But I’m not sure why you’d want to use anything other than an array…

    And at that point you might as well combine the above loop with your existing loop, so that you only have one loop.

    Also, if you have 1000 images being displayed, you will probably have horrible performance. BlackBerry has trouble dealing with 1000 fields of any type in a list, and images can be fairly heavyweight. It may even take so long to load on some devices that the BlackBerry will think your app is hanging and terminate it. Not to mention that it isn’t very good from a UI perspective to have so many items on a small mobile screen, since no user would be able to navigate to all of them in a reasonable timeframe.

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

Sidebar

Related Questions

I have an list of different Strings and I'd need to create a long
i need create an email list sending to many emails. what is best solution
I have a list of files, and i need to read them each in
I need to create a type that contains a few methods and a long
Using MySQL I need to have a list (possibly long list) of x,y coordinates.
I need create custom dialog and put JPanel into it. Is it possible?
Need to create a custom DNS name server using C which will check against
I need to create a historical timeline starting from 1600's to the present day.
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
I need to create a linked server to a DB2 database on a mainframe.

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.