Solved

Populate a combo box

Posted on 2012-04-10
3
494 Views
Last Modified: 2012-04-26
I have a combo box I created using Netbeans and it was created in my main program.  I have added a class and I would like to add items into the combo box in the class I added but being the box was added in the main program the external class does not recognize the name of the combo box.  The class I would like to use is a separate file.
0
Comment
Question by:sargent240
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 37830203
Set your own (new) ComboBoxModel on the combo box containing the items you want. From how you describe the extra class, are you sure you have it the right way around. i.e. are you sure you don't want to add items from the external class, rather than in it? If so, you need to create an instance of the external class and pass a reference of the combo or the combo box model to it
0
 

Author Closing Comment

by:sargent240
ID: 37895419
Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37896620
:)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question