if (components[i] instanceof JComboBox) list.add(materials[((JComboBox)components[i]).getSelectedIndex()]);
if (components[i] instanceof JComboBox) { int index = ((JComboBox)components[i]).getSelectedIndex(); list.add(materials[index]); }
	public Collection getCourseEquipment() {		ArrayList list = new ArrayList();				if (materialsName != null) {			Component[] components = courseEquipmentPanel.getComponents();						for (int i = 0; i < components.length; ++i)			    if (components[i] instanceof JComboBox)			        list.add(materials[((JComboBox)components[i]).getSelectedIndex()]);		}				return list;	}