Results 1 to 4 of 4
Thread: JCombo Box selection index?
- 07-14-2010, 06:02 AM #1
JCombo Box selection index?
Hi,
If I have JCombo Box with items like "ABC", "XYZ" and "ABC" at 1,2, and 3 index respectively. If I click any of them, then it is supposed to display the respective table.
But if I Click "ABC" of 3rd index then combo box returns the index of first found item, and so table of 1st item. In this way, I'll never get table of "ABC" at 3rd index.
I don't want to add id(which is unique) of each item to combo box so that each item would be unique.
How to overcome this problem?
- 07-14-2010, 08:41 AM #2
Member
- Join Date
- Jul 2008
- Posts
- 62
- Rep Power
- 0
see if you can follow the example here
Same value in JComboBox (Swing / AWT / SWT / JFace forum at JavaRanch)
- 07-14-2010, 09:10 AM #3
Ok,
I thought using as object might help me but I didn't had clear idea.
After looking at example, it's better now. I hope it'll work.
- Thanks
- 07-19-2010, 08:12 PM #4
Member
- Join Date
- Jul 2010
- Posts
- 6
- Rep Power
- 0
Similar Threads
-
populate jtable from jtextboxes and jcombo
By purejoker in forum AWT / SwingReplies: 4Last Post: 12-02-2010, 09:29 AM -
Netbeans, Editable JCombo and EventListener
By mine0926 in forum NetBeansReplies: 0Last Post: 07-10-2010, 03:55 AM -
jcombo in jtable
By anilkumar_vist in forum Advanced JavaReplies: 0Last Post: 12-12-2009, 06:47 AM -
Sort jcombo in jtable
By anilkumar_vist in forum Advanced JavaReplies: 1Last Post: 12-11-2009, 05:23 PM -
Display items in the JCombo Box
By eddy001 in forum AWT / SwingReplies: 1Last Post: 01-21-2008, 12:27 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks