How do i show all the values in one window(JOptionPane)??
I have the following code:
Quote:
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");
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);
}}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
catch(SQLException e)
{
e.printStackTrace();
}
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?
THANKS...