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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:15:10+00:00 2026-05-25T21:15:10+00:00

I have a label which i need to create as per the size of

  • 0

I have a label which i need to create as per the size of my record
like if there are 2 records from database , my method should check and create 2 new labels at runtime , if 10 records there should be 10 labels to be created at run time
I am able to create 10 new labels at run time but how can i name them differently

some thing like

                 for (int i =0;i<array.size();i++)
                  {
                      Label lbl = new Label();
                  }

in this way there are 10 labels and showing perfectly , but all ten have the same name i.e lbl can this name could also be change like lbl1,lbl2,lbl3…
is it possible in GWT

Thanks

  • 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-25T21:15:11+00:00Added an answer on May 25, 2026 at 9:15 pm

    The thing you want to do isn’t poosible in any programming language.

    The solution you are searching for is storing them inside a list and then access the labels via the index. Eg. if you want the first label you say List[0]

    GWT supports such list, the easiast for you to use ist the ArrayList!

    here is some more or less pseudo code:

        ArrayList<Label> labelList = new ArrayList<Label>();
        for (int i =0;i<array.size();i++)
        {
            Label lbl = new Label();
            labelList.add(lbl);
        }
    
        ...
    
        //the first item has the index 0!
        Label lbl1 = labelList.get(0);
        ..
        //doing stuff with the first label
        ...
        //getting the secont label
        Label lbl2 = labelList.get(1);
    
        ...
        //you get the idea right
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create module in Magento which will have few database tables. One
I want to have a checkbox for terms and conditions, label of which should
I have a button, the label of which I want to change back and
I use ASP.NET and have a label control on my page, which I fill
Ok, I have a label, inside this label is a div, which contains an
I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have TextBox (multiline) and Label in an UpdatePanel which I refresh with javascript
I have created an iframe which contains the label, powered by MyWebsite.site The iframe
Basically I have a series of divs which contains a label and an input
At the moment I have the following code which works fine. label = new

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.