I would like to return to my first dialog 'myPanel' everytime i press the cancel button. I managed to do this but it only works one time. have a look. I will appreciate your help. thanks in advance
int IPLBW = JOptionPane.showConfirmDialog(null, myPanel, "IPL BW
UTILIZATION",
JOptionPane.OK_CANCEL_OPTION);
nt laten = JOptionPane.showConfirmDialog(null, myPanel2, "IPL BW LATENCYN",
JOptionPane.OK_CANCEL_OPTION);
if (IPLBW == JOptionPane.OK_OPTION && laten ==JOptionPane.OK_OPTION )
{
JOptionPane.showConfirmDialog(null, myPanel, "IPL BW UTILIZATION",
JOptionPane.OK_CANCEL_OPTION);
}
/*PRINTS SOMETHING FROM THE VALUE OF MYPANEL AND MYPANEL2*/
else if (laten == JOptionPane.CANCEL_OPTION) {
JOptionPane.showConfirmDialog(null, myPanel, "IPL BW UTILIZATION",
JOptionPane.OK_CANCEL_OPTION);
JOptionPane.showConfirmDialog(null, myPanel2, "IPL BW LATENCY",
JOptionPane.OK_CANCEL_OPTION);
}
Aucun commentaire:
Enregistrer un commentaire