Adding ComboBox Items with a loop

From: - ions (negative_ions_0_at_hotmail.com)
Date: 12/28/03


Date: 28 Dec 2003 03:59:54 -0800

Hi, im a just wondering how to add elements into a JComboBox through a
loop ie. just say i wanted to add the numbers 1 throught to 100. It
seems easy but im having a bit of trouble. One problem which i have
had is that i end up only adding the last number (100) to the
ComboBox. Any help appreciated :)



Relevant Pages

  • Re: efficency question
    ... or Go throught it with a while or for loop? ... to believe that one piece of code is acting as a bottleneck. ... If replying to the group, please do not mail me too ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: switch and friends
    ... gopala wrote: ... doesn't pass throught the loop statement? ... It doesn't matter what has happened before then... ... tested at the start of the while loop. ...
    (comp.lang.c)
  • JITPipeline Dynamically add fields
    ... am unsure whether I should create a field object each itereation ... throught the loop and then call the addfield method of the JITpipline. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Help! how to get the content of each cell in a CellSet?
    ... you need to loop through the cellset, using an indexer to get the content. ... look throught the following c# code ...
    (microsoft.public.data.xmlanalysis)