Hi,

am using the H2 BD, the conncetion is okay and all is great in my VOIP project,

But the problem comes when i want to add a new contact so when i clic Add the JList that shows the contact on the BD don't add the new user contcat

this is the code how the JList get the conten

private void initComponents() {

private javax.swing.JList Listcontact;
Listcontact = new javax.swing.JList();

try {

Class.forName("org.h2.Driver");
Connection conn = DriverManager.
getConnection("jdbc:h2:~/voipdb", "sa", "");
// add application code here


Statement stm;
stm = conn.createStatement();
String req="select NOM, PRENOM from CONTACT";
ResultSet rst;
rst = stm.executeQuery(req);
DefaultListModel dlm=new DefaultListModel();
while(rst.next())
{
String stt = rst.getString("NOM");
String stt2 = rst.getString("PRENOM");
String stt3 = (stt + " "+ stt2);
dlm.addElement(stt3);

Listcontact.setModel(dlm);

}
conn.close();
} catch (Exception ex) {
System.out.println(ex.getMessage());
}

}


and i have a buton that has a function to add in the table,

how get the synchronisation the view of JList ?