package fr.iutfbleau.projetIHM2021FI2.Controller;

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

/**
 * @version 1.0
 * @author Anice TAJGALT, Gianni MANZARI, Alban DUMAS
 */


 
public class TextFieldController implements ActionListener {
    private JTextField champPrenom;
    private JTextField champRef;

    public TextFieldController(JTextField champPrenom, JTextField champNom, JTextField champRef) {
        
        this.champPrenom = champPrenom;
        this.champRef = champRef;
    }

    public void actionPerformed(ActionEvent e)
    {

        if (this.champPrenom.getText() != "") {
            this.champRef.setEditable(false);
        }
    }
}