public Inscription() {
    labelName = new JLabel(" Nom : ");
    labelFirstName = new JLabel(" Prénom : ");
    labelLogin = new JLabel(" Login : "******" Mot de passe : ");
    labelPassword2 = new JLabel(" Confirmation mot de passe : ");
    labelAddress = new JLabel("\n Adresse : ");

    name = new JTextField(5);
    password = new JPasswordField(8);

    password.setEchoChar('*');
    password2 = new JPasswordField(8);

    password2.setEchoChar('*');

    firstName = new JTextField(5);
    address = new JTextField(30);

    this.add(labelPassword);
    this.add(password);
    this.add(labelPassword2);
    this.add(password2);

    this.add(labelName);
    this.add(name);
    this.add(labelFirstName);
    this.add(firstName);
    this.add(labelAddress);
    this.add(address);
  }
Exemplo n.º 2
0
  public User() {

    frame = new JFrame("WELCOME TO LIBRARY MANAGEMENT_system");
    frame.setLayout(new FlowLayout());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // setSize(100,100);
    frame.setLayout(new FlowLayout());

    JButton b1 = new JButton("Save arrayList");
    b1.addActionListener(new Action(this));

    JButton b2 = new JButton("Save File");
    b2.addActionListener(new FileSave(this));

    JButton b3 = new JButton("Administrative");
    b3.addActionListener(new Admin(this));

    JButton b10 = new JButton("CHECK");
    b10.addActionListener(new Match(this));

    JButton b4 = new JButton("controller");
    b4.addActionListener(new Admin(this));

    JButton b5 = new JButton("ADD_student");
    b5.addActionListener(new Addstd(this));

    JButton b15 = new JButton("SAVE STUDENT DATA");
    b15.addActionListener(new Savestud(this));

    /* JButton b6 = new JButton("REMOVE_student");
    b6.addActionListener(new FileSave(this));*/

    JButton b7 = new JButton("ADD_NEW_BOOK");
    b7.addActionListener(new Booksav(this));

    JButton b8 = new JButton("SEARCH_book");
    b8.addActionListener(new Matchbook(this));

    /*JButton b9 = new JButton("REMOVE_book");
    b9.addActionListener(new FileSave(this));*/

    JButton b11 = new JButton("REGARDING_student");
    b11.addActionListener(new Regstdu(this));

    JButton b12 = new JButton("REGARDING_book");
    b12.addActionListener(new Regsbook(this));

    JButton b13 = new JButton("LOg_in");
    b13.addActionListener(new Login(this));

    JButton b14 = new JButton("SEARCH_student");
    b14.addActionListener(new Matchstd(this));

    JLabel l1 = new JLabel("UID");
    t1 = new JTextField(20);

    JLabel l2 = new JLabel("PASS");
    t2 = new JPasswordField(20);
    t2.setEchoChar('*');

    JLabel l3 = new JLabel("student_name");
    t3 = new JTextField(20);

    JLabel l4 = new JLabel("student_ID");
    t4 = new JTextField(20);

    JLabel l5 = new JLabel("student_Address");
    t5 = new JTextField(100);

    JLabel l6 = new JLabel("Enter_Book_ISBN");
    t6 = new JTextField(20);

    JLabel l7 = new JLabel("BOOK_title");
    t7 = new JTextField(40);

    JLabel l8 = new JLabel("Author_name");
    t8 = new JTextField(35);

    p1 = new JPanel();
    p3 = new JPanel();
    p4 = new JPanel();
    p5 = new JPanel();
    p6 = new JPanel();
    p7 = new JPanel();
    p8 = new JPanel();
    p9 = new JPanel();
    p11 = new JPanel();
    p12 = new JPanel();
    p13 = new JPanel();
    p14 = new JPanel();
    p15 = new JPanel();

    p1.add(b3);
    p1.add(b4);
    frame.add(p1);

    p3.add(l1);
    p3.add(t1);
    p3.setVisible(false);
    frame.add(p3);

    p4.add(l2);
    p4.add(t2);
    p4.setVisible(false);
    frame.add(p4);

    p5.add(b1);
    p5.add(b2);
    p5.add(b10);

    p5.setVisible(false);
    frame.add(p5);

    p6.add(b11);
    p6.add(b12);
    p6.setVisible(false);
    frame.add(p6);

    p7.add(l3);
    p7.add(t3);
    p7.setVisible(false);
    frame.add(p7);

    p8.add(l4);
    p8.add(t4);
    p8.setVisible(false);
    frame.add(p8);

    p9.add(l5);
    p9.add(t5);
    p9.setVisible(false);
    frame.add(p9);

    p11.add(l6);
    p11.add(t6);
    p11.setVisible(false);
    frame.add(p11);

    p12.add(l8);
    p12.add(t8);
    p12.setVisible(false);
    frame.add(p12);

    p13.add(b13);
    p13.setVisible(false);
    frame.add(p13);

    p14.add(b5);
    p14.add(b15);
    p14.add(b14);
    p14.setVisible(false);
    frame.add(p14);

    p15.add(b7);
    p15.add(b8);
    // p15.add(b9);
    p15.setVisible(false);
    frame.add(p15);

    // Pack();
    frame.setSize(300, 200);
    frame.setVisible(true);

    f = new File(fileLocation);
    frame.setSize(300, 200);
    frame.setVisible(true);
  }