Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 btnRechercher.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { Connection connection; PreparedStatement statement ; connection = null; try { try { Class.forName("org.sqlite.JDBC");//VK_undefined } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } connection = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\tosiba\\eclipse-workspace\\training1\\src\\training1\\BDD.db"); statement = connection.prepareStatement("SELECT Nom,Prenom,prix_du_loge,Type,N°_du_loge,Etage,Bloc,Versement_total,Versement_restant FROM Client WHERE Nom= ? AND Prenom= ? "); statement.setString(1, comboBox_1.getSelectedItem().toString()); statement.setString(2, comboBox_2.getSelectedItem().toString()); ResultSet rs = statement.executeQuery(); table_1.setModel(DbUtils.resultSetToTableModel(rs)); statement.close(); connection.close(); } catch(SQLException e1) { System.err.println(e1.getMessage()); JOptionPane.showMessageDialog(null, "Ce nom n'existe pas"); } }; });
j'arrive pas à changer de dimensions à mes colonnes








Répondre avec citation
Partager