Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Populate a combo box

Posted on 2012-04-10
3
Medium Priority
?
499 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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.
Suggested Courses

661 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