@Override
		public void itemStateChanged(ItemEvent event) {			
			boolean isSelected = event.getStateChange() == ItemEvent.SELECTED;
			//System.out.println(event);
			
			if(event.getSource() instanceof JComboBox && isSelected)
			{
//				portList = Arduino.list();
				JComboBox box = (JComboBox)event.getSource();
				
				if(box.getSelectedItem() instanceof ArduinoBoard)
				{
					board = (ArduinoBoard)box.getSelectedItem();
					pins.clear();
					for(Integer pin : board.getPins())
						pins.add(pin);
					
					CardLayout layout = (CardLayout)pinPanel.getLayout();
					layout.show(pinPanel, board.name());
				}
				
				else
				{
					comPort = Arduino.list()[box.getSelectedIndex()];
					System.out.println(comPort);
				}
				
			}
			
			else if(event.getSource() instanceof PinCheckBox)
			{
				PinCheckBox checkBox = (PinCheckBox)event.getSource();
				
				if(isSelected)
					pins.add(checkBox.getPin());
				else
				{
					pins.remove(checkBox.getPin());
					if(pins.isEmpty())
						MakerUI.okBt.setEnabled(false);
				}
								
				System.out.println(pins.toString());
			}
			
			if(!comPort.isEmpty() && !pins.isEmpty())
				MakerUI.okBt.setEnabled(true);

		}