Currently have an ArrayList called SundayList which is loaded as soon as the frame AddStudent is loaded (bit of GUI)
The code automatically generated by Netbeans is:
comboboxSunday = new javax.swing.JComboBox(); comboboxSunday.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item1", "Item2" }));
How do I load the combobox items with my own array? The array includes items such as:
Activity1 Activity2 Activity3 Activity4
From my previous search, people mentioned about using a toString()
and toArray()
, and I'm not familiar with either methods, and how they help in loading the list into the combobox as I'm quite new to java..