1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
import java.awt.*;
import javax.swing.*;
import java.util.*;
class frame_acl extends JFrame{
GridLayout monLayout;
JLabel nom=new JLabel("Nom_acl");
JLabel type=new JLabel("Type_acl");
JLabel valeur=new JLabel("Valeur");
JTextField txt1 = new JTextField("");
JTextField txt2 = new JTextField("");
JComboBox box = new JComboBox();
Button create = new Button("créer");
JLabel lb = new JLabel();
public frame_acl()
{
super("Ajout d'ACL");
this.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
this.setBounds (500,500, 400, 550);
this.setSize(400,400);
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(2,1));
p1.add(lb);
JPanel p2 = new JPanel();
p2.setLayout(new GridLayout(4,2));
p2.add(nom);
p2.add(type);
p2.add(valeur);
p2.add(create);
p2.add(txt1);
p2.add(txt2);
p2.add(box);
lb.setIcon(new ImageIcon("img4.jpg"));
this.setVisible(true);
}
public static void main(String args[])
{
new frame_acl();
}
} |
Partager