/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package clases;

import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 *
 * @author chuen
 */
public class ValidarCampos {
    
public void validarcampostxt(JTextField txtField){
    if(txtField.getText().equals("")){
        txtField.setText("CN");
    }
    }
public void validarcampostxtarea(JTextArea txtArea){
    if(txtArea.getText().equals("")){
        txtArea.setText("CN");
    }
    }
public void validarcamposcbx(JComboBox cbx){
    if(cbx.getSelectedIndex()==0){
        cbx.setSelectedItem("CN");
    }
}
        
}
