Application gestion de stock / Login interface P.1



/*
 * 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.
 */

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

import java.awt.*;

/**
 *
 * @author Ghassen ben taher
 */
public final class Login  {
    public Frame f=null;
    JLabel l1;
    public JLabel l2=null;
    public JTextField t1;
    JPasswordField t2=null;
    JButton b1;
    public JButton b2;
    JButton b3=null;
    
    public Login (){
        f= new JFrame (" Login & password  ");
        /* ------------------- */
        l1=new JLabel ("Login : ");
        l2=new JLabel ("Passowrd : ");
        /* ------------------- */
        t1=new JTextField ();
        t2=new JPasswordField();
        /* ------------------- */
        b3=new JButton ("Login");
        /* ------------------- */
        b1=new JButton ("Rest");
        b2=new JButton ("Cancel");
        /* ------------------- */
        init();
    }
    public void init(){
    f.setBounds(250,150, 600,280);
    f.setLayout(null);
    f.setVisible(true);
    /* ------------------- */
    l1.setBounds(50, 60, 100, 30);
    l2.setBounds(50, 110, 100 , 30);
    /* ------------------- */
    f.add(l1);
    f.add(l2);
    /* ------------------- */
    t1.setBounds(180, 60, 300, 30);
    t2.setBounds(180, 110, 300, 30);
    /* ------------------- */
    f.add(t1);
    f.add(t2);
    /* ------------------- */
    b1.setBounds(450, 170, 100, 30);
    
    b2.setBounds(250, 170, 100, 30);
    b3.setBounds(50, 170, 100, 30);
    
   
    
    
    
    f.add(b3);
    f.add(b2);
    f.add(b1);
    
    
}  
        
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Login Inter= new Login ();
    }
    
}


See You next part :=)

Comments