Solved

Populate a combo box

Posted on 2012-04-10
3
491 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now