JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(20, 51, 239, 198);
contentPane.add(scrollPane);
JTextPane Pane = new JTextPane();
Pane.setContentType("text/html");
Pane.setEditable(false);
scrollPane.setViewportView(Pane);
String html="<table>\r\n" +
" <thead> \r\n" +
" <tr> \r\n" +
" <th> ID </th>\r\n" +
" <th> Nombre </th>\r\n" +
" <th> Año </th>\r\n" +
" </tr>\r\n" +
" </thead>\r\n" +
" <tbody>\r\n";
Registrar Re=new Registrar();
Re.form(); // le doy valores String a los datos ID,Nombre,Año;
+ "<td>"+ ID +"</td>"
+ "<td>"+ name +"</td>"
+ "<td>"+ fecha_Nacimiento +"</td>"
+ " </tr>";
Pane.setText(html);
The problem is that when you run, you replace the values, you do not attach them, and I really have not been able to solve them.