@Override
			public void actionPerformed(ActionEvent ae) {
				try {
					if (box.getSelectedIndex() != 0) {
						selected_sensor = detector.initSensor((String)box.getSelectedItem());
						all_msg_num.setText("Number of received msg: " + selected_sensor.getNumberOfReceivedMsg());
						missin_msg_num.setText("Number of missing msg: " + selected_sensor.getNumberOfMissingMsg());
						avg_l.setText("Avg light value: " + selected_sensor.getAvarageLight());
						avg_t.setText("Avg temperature: " + selected_sensor.getAvarageTemp()/8);
						max_t.setText("Max temperature: " + (float)selected_sensor.getMaxTemp()/8);
						min_t.setText("Min temperature: " + (float)selected_sensor.getMinTemp()/8);
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
			}