Solved

Populate a combo box

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

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.
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

617 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