Well, im saving reports but I've been having some trbs with the JCheckBox..
What i want to do is: When i click NO button, need no to save the file & unchecked the JCheckbox.
Due to everytime I press or click JCheckbox button actives the JOptionPane.
private boolean saveReport(){
String msg = "<html><center>¿Desea Guardar el Archivo<br></center>" +
"<center>en el <b>Ordenador</b>?</br></center></html>" ;
JLabel label = new JLabel(msg);
label.setFont(new Font("verdana", Font.PLAIN, 13));
if(this.guardar_Reporte.isEnabled()){
JOptionPane.showConfirmDialog(this,label,"Guardar Archivo.",JOptionPane.YES_NO_OPTION);
return true;
}
if(JOptionPane.showConfirmDialog(this,label,"Guardar Archivo.",JOptionPane.YES_NO_OPTION)
== JOptionPane.YES_OPTION){
exportReports();
return true;
}
if(JOptionPane.showConfirmDialog(this,label,"Guardar Archivo.",JOptionPane.YES_NO_OPTION)
== JOptionPane.NO_OPTION){
this.guardar_Reporte.setSelected(false);
return true;
}
return false;
}