2016-04-03 29 views
0
int result = JOptionPane.showConfirmDialog(null, "Do you want to continue the program?",null, JOptionPane.YES_NO_OPTION); 

if (result == JOptionPane.NO_OPTION) { 
    System.exit(0); 
} 
if (result == JOptionPane.YES_OPTION) { 
    // What do i put here to run my program again? 
} 
+2

Ben GUI'leri ile çalışma tavsiye etmem açık Çerçeveler kapatmak zorunda olduğunu düşünebiliriz Döngüleri gibi. – Natecat

cevap

0

Sen, tıpkı diğer yöntem gibi main() yöntemini çağırın ama tüm değerleri sıfırlamak ve ilgili tüm dil temelleri öğrenmek önce

İlgili konular