hi,i have a problem.my program consist to show high scores from tetris which is played on line and we have to use it and add a method which can help us to show high score . The scores have to be shown in JDialog but i don't know how i can write into the JTable the informations receive by the servlet which has answered to my request.
I have written this one but i don't know how to write informations obtained by the servlet ,it is the part in red

private void BtnScoreActionPerformed(ActionEvent evt) {
//System.out.println("BtnScore.actionPerformed, event=" + evt);
//TODO add your code for BtnScore.actionPerformed
String res,nom;
int numPers,score,niveau;
try{
URL url=new URL("http://localhost:8080/ProjetServlet/affscore");
URLConnection connexion=url.openConnection();
connexion.setDoOutput(true);
ObjectOutputStream fluxsortie = new ObjectOutputStream(connexion.getOutputStream());
fluxsortie.writeObject("");
ObjectInputStream fluxentree = new ObjectInputStream(connexion.getInputStream());
SerializedResultSet donnees = (SerializedResultSet) fluxentree.readObject();
//affichage du résultat
donnees.first();
//JTable jTable1 = new JTable(donnees, ( "Position "," nom "," Niveau", " Score " ));
Vector contenu = new Vector();

ListeResultat.setModel(contenu)
for(int i=0;i<donnees.recordCount();i++){
numPers= donnees.getInt("position");
nom= donnees.getString("nom");
niveau= donnees.getInt("niveau");
score= donnees.getInt("score");
//contenu.addElement(res);
donnees.next();
}
if (donnees.recordCount()==0){
res = "aucun score disponible";
contenu.addElement(res);
}
ListeResultat.

}
catch(Exception sql)
System.out.println("erreur"+ sql);
}
}







and i don't know if the request used in servlet is right.Bestjoueurs is an array of names which represent the players with the five best scores and Attributs is a 2D array which represent the level and the score of those players.This is the Servlet program




package MesServlets;

import java.io.*;
import java.sql.Connection;

import java.sql.*;

import javax.naming.*;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.sql.*;

import SResultSet.SerializedResultSet;

public class ServerTetris extends HttpServlet {
private DataSource ds;
Connection BD;
String requeteentree;
SerializedResultSet sresultat;

protected void DoPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,IOException{
try{
ObjectInputStream entree = new ObjectInputStream(req.getInputStream());
requeteentree =(String)entree.readObject();
ObjectOutputStream sortie = new ObjectOutputStream(res.getOutputStream());
sresultat = ExecuterRequete(requeteentree);
sresultat.first();
sortie.writeObject(sresultat);
}catch(Exception ex){
ex.printStackTrace();
}
}


public SerializedResultSet ExecuterRequete(String Query){
Query = "select * from BestJoueurs,Attributs";
try{
BD =ds.getConnection();
Statement s= BD.createStatement();
ResultSet r= s.executeQuery(Query);
ResultSetMetaData columnNames= r.getMetaData();
SResultSet.SerializedResultSet sResultSet = new SResultSet.SerializedResultSet();
for(int i=1;i<=columnNames.getColumnCount();i++){
sResultSet.addColumn(columnNames.getColumnName(i), i);
}
while(r.next()){
for(int column = 1; column<=columnNames.getColumnCount();column++){
sResultSet.addColumnData(column,r.getObject(column ));
}
}
r.close();
s.close();
BD.close();
s=null;
r=null;
return sResultSet;
}
catch(SQLException ex){
System.out.println("erreur d'execution de la requete SQL: "+ex);
return null;
}
}

public void init(){
try{
Context initCtx = new InitialContext();
System.out.println("lookup de env");
Context envCtx = (Context) initCtx.lookup("java:comp/env");
System.out.println("lookup de base_test");//es ce la meme base?
ds=(DataSource)envCtx.lookup("base_test");
}catch(Exception er){
System.out.println("erreur de chargement du contexte " + er);
}
}
}



i hope there are some people who can help me,thanks