Solved

Populate a combo box

Posted on 2012-04-10
3
496 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jmeter usage 4 68
learn programming 8 95
Java pass by reference 3 74
How to fix  socket closed error 11 64
A short article about problems I had with the new location API and permissions in Marshmallow
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

752 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