0
How to use getSelectedIndex correctly??
Hi I have got a problem (in Java language). When I use (getSelectedIndex) it only gives me the first thing it mach with . But I want to use that and get Selected Index on repeat . How can I do that.( Sorry for my bad English I'm just a 15 years old Iranian child). Thanks for your help
4 Answers
0
Hii
Well, I don't know java very well, but you should link your code here, so we can see it!
Keep on coding :)
0
choose one:
javax.swing.JComboBox.getSelectedIndex()
javax.swing.JList.getSelectedIndex()
javax.swing.JTabbedPane.getSelectedIndex()
javax.swing.SingleSelectionModel.getSelectedIndex()
javax.swing.DefaultSingleSelectionModel.getSelectedIndex()
java.awt.List.getSelectedindex()
java.awt.Choice.getSelectedIndex()
org.w3c.dom.html.HTMLSelectElement.getSelectedIndex()
javax.security.auth.callback.ConfirmationCallback.getSelectedIndex()
0
What do you mean.
OK. I choose javax.swing.JComboBox.getSelectedIndex.
0
javax.swing.JComboBox is for single selection,
for multiple selection use JList
it is possible solutions like re-implement classes used by JComboBox, but it is much more complicated