2012年3月18日 星期日

Homework 06: Some Cases Study

Kill the Mos'

MessageBox to inform winner
In the case study, I learnt how to create a simple game in Processing, how to use ArrayList and how to show a MessageBox to notify/inform player that they already win!

Source code for MessageBox
//Display message box
void MsgBox( String Msg, String Title ) {
  try {
    // Messages 
    javax.swing.JOptionPane.showMessageDialog ( null, Msg, Titel, javax.swing.JOptionPane.INFORMATION_MESSAGE  );
  }
  catch (Exception e)
  {
    javax.swing.JOptionPane.showMessageDialog(null, "I'm over here with this error: " + e);
  }
}

沒有留言:

張貼留言