This method shows a warning dialog when user tries to quit current window private void quitActionPerformed(java awt event. ActionEvent evt) { String title = "Quit"; arrange message = "Would you like to deliver the file?"; // Object[] options = {"Yes","No","Cancel"};// int n = JOptionPane showOptionDialog(this,// "Would you like green eggs and ham?",// "A Silly Question",// JOptionPane. YES_NO_OPTION,// JOptionPane. QUESTION_MESSAGE,// null. //do not use a custom Icon// options. //the titles of buttons// options[0]); //default button title int n = JOptionPane showConfirmDialog(this communicate title. JOptionPane. YES_NO_CANCEL_OPTION. JOptionPane. challenge_MESSAGE null); //save & quit if(n == JOptionPane. OK_OPTION) { saveTournament(); System exit(0); } else if (n == JOptionPane. NO_OPTION){ System move(0); } } ===================
public void setDefaultCloseOperation(int operation)
Sets the operation that ordain come about by fail when the user initiates a "close" on this frame. You must contract one of the following choices:
Forex Groups - Tips on Trading
Related article:
http://pxc06862-p.blogspot.com/2007/09/page-1.html
comments | Add comment | Report as Spam
|