
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;


public class log 
{
	public static void main(String[] args)
	{	JFrame jf = new JFrame("Connexion");
		jf.setSize(500, 200);
		jf.setLayout(null);
		jf.setResizable(false);
		jf.setLocationRelativeTo(null);
	
		/* barre de menu 
		
		JMenuBar m = new JMenuBar();
		JMenu menu = new JMenu("Fichier");
		
		*/
		
		/* label */
		
		JLabel label = new JLabel("Login :", JLabel.RIGHT);
		label.setLocation(125,30);
		label.setSize(100,35);
		jf.add(label);
		
		JLabel label1 = new JLabel("Mot de passe :", JLabel.RIGHT);
		label1.setLocation(125,70);
		label1.setSize(100,35);
		jf.add(label1);
		
		JLabel label2 = new JLabel("Login ou mot de passe Incorecte", JLabel.CENTER);
		label2.setLocation(130,10);
		label2.setSize(250,25);
		jf.add(label2);
		
		
		/* textField */
		
		JTextField tf = new JTextField("");
		tf.setLocation(250,35);
		tf.setSize(100,25);
		jf.add(tf);
		
	
		JPasswordField pf1 = new JPasswordField("");
		pf1.setLocation(250,75);
		pf1.setSize(100,25);
		jf.add(pf1);
		
		
		/* Bouton */
		
		JButton bouton = new JButton("Connexion");
		bouton.setLocation(200,120);
		bouton.setSize(100,30);
		bouton.addActionListener(new EcouteurConnexion(tf,pf1,label2));
		jf.add(bouton);
	
				
				
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jf.setVisible(true);
				
	}		
}			
				
				
				
				