I have the following code:
the problem is that it shows the values but i have to click on accept to continue with the next one, How do i show all the values in one window?try { Class.forName("com.mysql.jdbc.Driver"); conec = DriverManager.getConnection("jdbc:mysql://localhost/Inventory","root", ""); est=conec.createStatement(); res=est.executeQuery("SELECT id_client,name_client,date FROM client"); [B]while(res.next()) { idClient1=res.getString("id_client"); NameClient=res.getString("name_client"); Date1=res.getString("date"); JOptionPane.showMessageDialog(null, "Document: "+idClient1+"\nName: "+NameClient+"\nDate: "+Date1); }[/B]} catch(ClassNotFoundException e) { e.printStackTrace(); } catch(SQLException e) { e.printStackTrace(); }
THANKS...