public void actionPerformed(ActionEvent e) {
		
		if(e.getSource() == buttonStop){
			serial.write(125);
			MainWindow mainWindow = new MainWindow(serial, laser1, laser2);
			dispose();
			timer.stop();
		}
		
		if(e.getSource() == buttonIncreaseL1){
			serial.write(108);
		}
		
		if(e.getSource() == buttonReduceL1){
			serial.write(110);
		}
		
		if(e.getSource() == buttonIncreaseL2){
			serial.write(109);
		}
		
		if(e.getSource() == buttonReduceL2){
			serial.write(111);
		}
		
		if(e.getSource() == timer){
			if(serial.getDataAvailable()){
				System.out.println(serial.getTest());
				serial.setDataAvailable(false);
				labelPower.setText("Current power : " + serial.read() + "mW.");
			}
		}
	}