Пример #1
2
  AdminMain() {
    l = new JLabel();
    l.setBounds(10, 20, 1340, 1000);
    l.setBackground(Color.black);
    Font ft = new Font("Arial", Font.BOLD, 30);
    Font ft1 = new Font("Arial", Font.BOLD, 14);
    Font ft2 = new Font("Arial", Font.BOLD, 20);

    f1 = new Frame("Soft Test Management (Beta)");
    f1.setLayout(null);

    l1 = new Label("Test Instructions", l1.CENTER);
    l1.setBounds(10, 20, 1300, 60);
    l1.setForeground(Color.blue);
    l1.setBackground(Color.white);
    l1.setFont(ft);

    l2 = new JLabel("Deletion of Faculty/Students");
    l2.setBounds(20, 30, 1000, 500);
    l2.setBackground(Color.blue);
    l2.setFont(ft2);
    l3 = new JLabel("Test Pattern");
    l3.setBounds(20, 90, 1300, 500);
    l3.setBackground(Color.green);
    l3.setFont(ft2);

    b1 = new JButton("Go !");
    b1.setBounds(300, 220, 120, 30);
    b1.setBackground(Color.white);
    b1.setForeground(Color.blue);
    b1.setFont(ft2);

    b2 = new JButton("Go");
    b2.setBounds(300, 240, 120, 30);
    b2.setBackground(Color.white);
    b2.setForeground(Color.blue);
    b2.setFont(ft2);

    f1.add(l);
    l.add(l1);
    l2.add(b1);
    l.add(l2);
    l3.add(b2);
    l.add(l3);

    b1.addActionListener(this);
    b2.addActionListener(this);

    f1.setVisible(true);
    f1.setSize(1800, 800);
  }
Пример #2
0
  public Deta_Ventas_r() {
    setBackground(Color.gray);
    setLayout(null);
    setSize(400, 400);
    l1 = new Label(" clave ");
    t1 = new TextField(36);
    l2 = new Label("Vendedor");
    t2 = new TextField(20);

    l3 = new Label("Cliente");
    t3 = new TextField(20);
    l4 = new Label("Fechas");
    t4 = new TextField(5);
    l5 = new Label("monto_final");
    t5 = new TextField(5);
    t4.setEditable(false);
    t5.setEditable(false);
    b = new Button("Registrar");
    add(l1);
    add(t1);
    add(l2);
    add(t2);
    add(l3);
    add(t3);
    add(l4);
    add(t4);
    add(l5);
    add(t5);
    add(b);
    l1.setBounds(24, 75, 71, 23);
    l2.setBounds(24, 103, 90, 23);
    l3.setBounds(24, 131, 90, 23);
    l4.setBounds(24, 159, 90, 23);
    l5.setBounds(24, 185, 90, 23);
    t1.setBounds(114, 75, 270, 23);
    t2.setBounds(114, 103, 270, 23);
    t3.setBounds(114, 131, 270, 23);
    t4.setBounds(114, 159, 270, 23);
    t5.setBounds(114, 185, 270, 23);
    b.setBounds(167, 215, 65, 23);
    b.addActionListener(this);
    setUndecorated(true);
    setLocation((Toolkit.getDefaultToolkit().getScreenSize().width / 2) - 200, 50);
    start();
  }
Пример #3
0
 public LoginScreen(final Home hm) {
   setSize(600, 550);
   setLayout(null);
   this.hm = hm;
   name = new Label("Username : "******"Password :"******"login");
   login.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           try {
             if (isValidUser()) {
               hm.removeAll();
               hm.userId = nameText.getText();
               hm.p2 = new BaseApplet(hm);
               hm.p2.setBounds(0, 50, 600, 550);
               hm.add(hm.p2);
               hm.revalidate();
             } else {
               JOptionPane.showMessageDialog(
                   null, "Invalid Credentials", "Alert", JOptionPane.OK_OPTION);
             }
           } catch (Exception e1) {
             System.out.println("Error");
           }
         }
       });
   login.setBounds(200, 150, 100, 30);
   add(login);
 }
Пример #4
0
  void launch() {
    f.setSize(800, 800);
    p.setLayout(null);

    l1.setBounds(600, 10, 150, 36);

    l2.setBounds(100, 30, 400, 70);
    l13.setBounds(2, 90, 1200, 20);

    l14.setBounds(80, 150, 250, 30);
    t1.setBounds(330, 150, 150, 30);
    b1.setBounds(500, 150, 100, 30);
    l15.setBounds(2, 200, 1200, 20);

    b6.setBounds(600, 50, 100, 30);
    l3.setBounds(100, 250, 100, 30);
    t2.setBounds(300, 250, 150, 30);
    l4.setBounds(100, 300, 150, 30);
    t3.setBounds(300, 300, 150, 30);
    l5.setBounds(100, 350, 150, 30);
    t4.setBounds(300, 350, 150, 30);
    l6.setBounds(100, 400, 100, 30);
    t5.setBounds(300, 400, 150, 30);
    l7.setBounds(100, 450, 100, 30);
    c1.setBounds(300, 450, 60, 30);
    c2.setBounds(400, 450, 60, 30);
    l8.setBounds(100, 500, 100, 30);
    t6.setBounds(300, 500, 150, 30);
    l9.setBounds(100, 550, 100, 30);
    t7.setBounds(300, 550, 150, 30);
    l10.setBounds(100, 600, 120, 30);
    t8.setBounds(300, 600, 150, 30);

    l11.setBounds(100, 650, 100, 30);
    t9.setBounds(300, 650, 150, 30);
    l12.setBounds(100, 700, 150, 30);
    t10.setBounds(300, 700, 150, 30);
    b2.setBounds(500, 400, 100, 30);
    b3.setBounds(500, 500, 100, 30);
    b4.setBounds(500, 600, 100, 30);
    b5.setBounds(650, 150, 100, 30);

    b1.addActionListener(this);
    b2.addActionListener(this);
    b3.addActionListener(this);
    b4.addActionListener(this);
    b5.addActionListener(this);
    b6.addActionListener(this);
    c1.addItemListener(this);
    c2.addItemListener(this);

    p.add(l1);
    p.add(l2);
    p.add(l13);
    p.add(l14);
    p.add(t1);
    p.add(b1);
    p.add(l15);
    p.add(b5);
    p.add(b6);

    f.add(p);

    f.setVisible(true);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }