I need a little help please,here is my question:
How can I get the current index in a jComboBox?

I searched it on google and i cant seem to find any answer.
I need to get the index of the item that I select from a Combobox.

Please help

Rather than Google, you first point of reference should be the JComboBox API documentation, where you will find the following...

public int getSelectedIndex() ... Returns an integer specifying the currently selected list item, where 0 specifies the first item in the list; or -1 if no item is selected or if the currently selected item is not in the list

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.