/**
 * @(#)Text1.java
 *
 *
 * @author 
 * @version 1.00 2018/3/20
 */
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;

public class telaj extends JFrame implements ActionListener
{
	JPanel Painel1, Painel2, Painel3, Painel4; 
	JButton btlogar, btcancel, btsair;
	JTextField tfnome;
	JLabel lblinform, lblnome;
	JPasswordField tfsenha;
	
    public telaj() 
    {
    		getContentPane().setLayout(new GridLayout(4, 1)); 
    		getContentPane().add(Painel1 = new JPanel (new FlowLayout(FlowLayout.CENTER))); 
    		Painel1.add(lblinform = new JLabel("INFORME SEUS DADOS")); 
    		getContentPane().add(Painel2 = new JPanel (new FlowLayout(FlowLayout.LEFT))); 
    		Painel2.add(lblnome = new JLabel("NOME:"));
    		Painel2.add(tfnome = new JTextField(20)); 	
    		getContentPane().add(Painel3 = new JPanel (new FlowLayout(FlowLayout.LEFT))); 
    		Painel3.add(new JLabel("SENHA:")); 
    		Painel3.add(tfsenha = new JPasswordField(20));
    		getContentPane().add(Painel4 = new JPanel (new FlowLayout(FlowLayout.CENTER))); 
			Painel4.add(btlogar = new JButton ("LOGAR"));
			Painel4.add(btcancel = new JButton ("CANCELAR")); 
			Painel4.add(btsair = new JButton ("SAIR"));  
    		btlogar.addActionListener(this);  
    		btcancel.addActionListener(this); 
    		btsair.addActionListener(this); 
    		pack();
    		setVisible(true); 
    		setResizable(false);
    }
    public  static void main (String args [])
    {
    		new telaj();
    }
    public void actionPerformed (ActionEvent e)
    {
    		if(e.getSource()==btsair)
    		{
    			 System.exit(0); 
    		}
    		if(e.getSource()==btcancel)
    		{
    			tfnome.setText("");
    			 tfsenha.setText("");
    		}
    		if(e.getSource()==btlogar)
    		{
    			new Tela_do_Yuri();
    			dispose(); 
    		}
    	
    }
    
}