import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.*;

public class inicio extends JFrame implements ActionListener  {

         JPanel Painel1 = new JPanel(new FlowLayout(FlowLayout.CENTER));
         JPanel Painel2 = new JPanel(new FlowLayout(FlowLayout.CENTER));
         JTextField tf_Login;
		 JPasswordField tf_Senha;
		 JButton bt_Entrar, bt_Cancelar;

         public inicio(){
         getContentPane().setLayout(new GridLayout(2, 1));
         getContentPane().add(Painel1);
         Painel1.add(new JLabel ("Login:"));
		 Painel1.add( tf_Login = new JTextField(15));
		 Painel1.add(new JLabel ("Senha:"));
		 Painel1.add(tf_Senha = new JPasswordField (15));
         getContentPane().add(Painel2);
         Painel2.add(bt_Entrar = new JButton("Entrar"));
		 Painel2.add(bt_Cancelar = new JButton("Cancelar"));
		 bt_Entrar.addActionListener(this);
    	 bt_Cancelar.addActionListener(this);
         pack();
		setVisible(true);
		}
		public static void main (String args [])
		{
	    	new inicio();
	    }
		public void actionPerformed (ActionEvent e){

    			if(e.getSource()==bt_Entrar){
    				String Nome = tf_Login.getText().toLowerCase();
    				String Senha= tf_Senha.getText().toLowerCase();
    				if((Nome.equals("fran"))&&(Senha).equals("fran")){
    					new trabalho();
    					dispose();
    				}
}
}  }
