import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class DetectConvertion implements ActionListener{
    public JTextField champsFarenheit;
    public JTextField champsCelsius;
    
    public DetectConvertion(JTextField champsFarenheit, JTextField champsCelsius){
	this.champsFarenheit = champsFarenheit;
	this.champsCelsius = champsCelsius;
    }

    @Override
    public void actionPerformed(ActionEvent evenement){
	String valeur = evenement.getActionCommand();
        this.champsCelsius.setText("");
	this.champsFarenheit.setText(valeur);
    }
}
