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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Main extends JFrame implements ActionListener {
public void main() {
JFrame J = new JFrame();
J.setTitle("Création Signature Outlook");
J.setSize(450, 450);
J.setVisible(true);
J.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel Nom = new JLabel(" Préciser Votre Nom");
JLabel Prenom = new JLabel(" Préciser Votre Prénom");
JLabel Tel = new JLabel(" Préciser Tél");
JLabel Fax = new JLabel(" Préciser Votre Fax");
JLabel Email = new JLabel(" Préciser Votre Email");
JLabel Adresse = new JLabel(" Préciser Adresse");
// JSlider Sl = new JSlider();
// Sl.setVisible(true);
// Sl.setSize(56,78);
// JToolTip tip = new JToolTip();
// tip.setVisible(true);
// tip.addNotify();
// tip.setSize(78,89);
// JColorChooser Cl = new JColorChooser();
// Cl.setSize(240,240);
// Cl.setVisible(true);
// JCheckBoxMenuItem Menu=new JCheckBoxMenuItem();
// Menu.setVisible(true);
// Menu.setSize(240,250);
JButton I = new JButton("Créer image");
I.addActionListener(this);
I.setSize(25, 20);
I.setVisible(true);
Font police = new Font("Tahoma", Font.BOLD, 16);
JButton A = new JButton("Besoin d'aide");
A.addActionListener(this);
A.setSize(25, 20);
A.setVisible(true);
JButton H = new JButton("Créer HTML");
H.addActionListener(this);
H.setSize(25, 20);
H.setVisible(true);
JCheckBox Check = new JCheckBox();
Check.setSize(23,50);
Check.setVisible(true);
JTextArea T = new JTextArea(" Preciser votre nom");
T.setSize(100,50);
T.setVisible(true);
JTextArea T1 = new JTextArea(" Preciser votre prenom");
T.setSize(100,50);
T.setVisible(true);
JTextArea T2 = new JTextArea(" Préciser votre Pôle d'appartenance");
T.setSize(100,50);
T.setVisible(true);
JTextArea T3= new JTextArea(" Préciser votre Numéro de téléphone");
T.setSize(100,50);
T.setVisible(true);
JTextArea T4= new JTextArea(" Préciser votre Numéro de Fax");
T.setSize(100,50);
T.setVisible(true);
JTextArea T5= new JTextArea(" Souhaitez vous ajouter l'adresse ?");
T.setSize(100,50);
T.setVisible(true);
JPanel pan = new JPanel();
//GridLayout jours = new GridLayout(3, 2, 5, 5);
//BorderLayout jours=new BorderLayout();
//GridLayout jours=new GridLayout();
//CardLayout jours=new CardLayout();
SpringLayout SL= new SpringLayout();
pan.setLayout(SL);
pan.applyComponentOrientation( ComponentOrientation.RIGHT_TO_LEFT);
pan.setSize(400,400);
//pan.add(Menu);
pan.add(Nom);
pan.add(Prenom);
pan.add(Tel);
pan.add(Fax);
pan.add(Adresse);
// pan.add(tip);
// pan.add(Sl);
// pan.add(Cl);
pan.add(I);
pan.add(H);
pan.add(Check);
pan.add(A);
pan.add(T);
pan.add(T1);
pan.add(T2);
pan.add(T3);
pan.add(T4);
pan.add(T5);
J.setContentPane(pan);
J.setVisible(true);
//J.setBackground();
}
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if(source == I){
System.out.println("Création d'une image");
} else if(source == A){
System.out.println(" Accéder à l'aide");
}
}
} |
Partager