My code array. How to insert item in array?
int listElemCount = jCBWorkerMen.getItemCount();
Object[] selectionValues = null;
for (int i = 0; i < listElemCount; i++) {
selectionValues[i] = (Object[]) jCBWorkerMen.getItemAt(i);
System.out.println(selectionValues);
}
String initialSelection = "Dogs";
Object selection = JOptionPane.showInputDialog(null, "What are your favorite animals?", "Zoo Quiz", JOptionPane.QUESTION_MESSAGE, null, selectionValues, initialSelection);
System.out.println(selection);