Solved

JComboBox

Posted on 2001-07-03
2
334 Views
Last Modified: 2010-04-16
hi i have used a Model for JCombobox because i need to have 2 comboboxes with identical data. This part works fine. What i don't like is when i select an item both comboboxes select same item. How can i have so that only one will be selected since model is shared ? Any thoughts ?

thanks.
0
Comment
Question by:vnd
2 Comments
 
LVL 4

Accepted Solution

by:
kylar earned 25 total points
ID: 6249630
What you need to do is have 2 seperate models that contain the same data.  The item that is selected is a function of the model, so when one combobox selects an item, both comboboxes will think that item was selected. Create a second model and copy all the data into it.

Kylar
0
 

Author Comment

by:vnd
ID: 6249633
i see , thanks.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.

708 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

18 Experts available now in Live!

Get 1:1 Help Now