0
Good afternoon. I want to set the option of a Jcombobox field as the registered option in a given vector position. For a previous text field, I made the following settings:
campoCpf.setText(vetAluno[i].getCpf());
To set the Jcombobox, as I would call the selected option of the array, assuming, for example, 3 options, if I selected one of them and the register was saved as that option chosen, how to call?
I know I must set the field like this:
campoCurso.setSelectedIndex();
but which parameter should I pass?
You have a variable and you want the
JComboBox
select the position that has the value of this variable, is this?– Mauro Roberto