Hello good night I want to pass data from my BD to a JDialog as you can see the code and the question that are in the table but I do not know how to pass the values of the combos and options to jDialog in advance thank you very much.
private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) {
int row = TablaPreguntas.getSelectedRow();
if (row != -1) {
try {
codigo = Integer.parseInt(TablaPreguntas.getValueAt(row, 0).toString());
this.txtAreaPregunta.setText(this.TablaPreguntas.getValueAt(row, 1).toString());
this.cboEspecialidad.setSelectedItem(ps.getEspecialidad());
this.txtRespuestaA.setText(ps.getOpcionA());
//this.txtRespuestaB.setText(ps.getOpcionA());
//this.txtRespuestaC.setText(ps.getOpcionA());
//this.txtRespuestaD.setText(ps.getOpcionA());
//this.txtRespuestaE.setText(ps.getOpcionA());
//this.cboRespuesta.setSelectedItem(ps.getRespuesta());
DialogPregunta.setSize(672, 539);
DialogPregunta.setLocationRelativeTo(null);
DialogPregunta.setVisible(true);
nuevo++;
} catch (Exception e) {
e.printStackTrace();
}
} else {
JOptionPane.showMessageDialog(this, "No ha seleccionado ninguna fila");
}