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
|
public class Affichage extends JFrame
{
private JTextField _nom, _tel;
private JButton Valider;
private JButton Listeb;
public String nom;
public String tel;
/*-------------------------------*/
public Affichage()
{
Container contenu = getContentPane();
contenu.setLayout(null);
_nom = new JTextField(20);
//_nom.setText(req.remplirRequete("presentation","nom","select nom from presentation"));
_nom.setBounds(220,80,180,20);
_nom.setEnabled(false);
contenu.add(_nom);
JPanel F13 = new JPanel();
F13.setLayout(new FlowLayout(FlowLayout.LEFT));
F13.add(new JLabel("BUREAUX"));
F13.setBounds(90, 540, 90, 20);
contenu.add(F13);
JPanel F14 = new JPanel();
F14.setLayout(new FlowLayout(FlowLayout.LEFT));
F14.add(new JLabel("Tel :"));
F14.setBounds(10, 560, 60, 20);
contenu.add(F14);
_tel = new JTextField(20);
//_tel.setText(req.remplirRequete("presentation","tel","select tel from presentation"));
_tel.setBounds(70,560,100,20);
_tel.setEnabled(false);
contenu.add(_tel);
/*detail facture
*1ere JTable
*/
String[] columnNames = {"N° des prix",
"Designation des ouvrages",
"Unités",
"Quantités",
"Prix Unitaires",
"Montant"};
Object[][] data = { /*bdd*/ };
/*2eme JTable*/
String[] columnNamesBis = {"Q*T",
"montants"
};
Listeb = new JButton("Resultat");
Listeb.setBounds(500, 500, 110, 30);
/*Listeb.addActionListener(new BtnTableauListenerFacturation("select * from detailFacture", "DetailFacture", "Resultat"));*/
contenu.add(Listeb);
Valider = new JButton("Valider");
Valider.setEnabled(true);
Valider.setBounds(200, 640, 100, 20);
//Valider.addActionListener(new MonActionListenerAffichage(this)
contenu.add(Valider);
}
public static void main(String[] args)
{
Affichage fenetreAffichage = new Affichage();
fenetreAffichage.setTitle("Affichage");
fenetreAffichage.setSize(800, 700);
fenetreAffichage.setVisible(true);
fenetreAffichage.setLocationRelativeTo(null); //centrer la fenêtre
//fenetreAffichage.setResizable(false);
fenetreAffichage.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
} |
Partager