//File: SoundWin.java --- @CopyLeft by tsaiwn@csie.nctu.edu.tw
///Test Open a URL window, playing Song in Applet and Application
/// Also show you how Applet works through tracing each function
/// More Files need in addition to the SoundWin.java :
/// howcome.au, laugh.au, welcome.wav and gigi.jpg , gigib.jpg
/// All files for this example can be found here:
// http://www.csie.nctu.edu.tw/~tsaiwn/course/java/examples/soundwin/
///
//To compile this program:
// javac -encoding Big5 -target 1.1 SoundWin.java
//
//You can try this URL:
// http://www.csie.nctu.edu.tw/~tsaiwn/course/java/
// examples/soundwin/testsw.html
//
//This program demostrate:
// (1) How to open another URL. Either from Applet or from Application.
// (2) How to play Sound Files. Either from Applet or from Application)
// (3) Plus, We also include an Image Button in this demo.
// And, use a thread to act as a timer to perform the hint task.
// It will show a message that rolling to left on the panel.
// While another message is shown on a flash manner.
// (會有一個跑馬燈 以及一列閃爍的提示訊息)
// (4) 若當作 Application 來 Run, 會看到一大堆跑過各主要程式的訊息,
// 包括 main, init, start, repaint, update, paint 等
// (5) 若當 Applet (由 Browser 中看), 則該些訊息在 Java Console(主控台),
// 可在 Browser 的 工具 ==> Java 主控台 把 Java 的 Consol 叫出來觀看.
// (請check 你的 Browser 確認你是用 Sun 的 JVM 還是用 Microsoft VM ?)
// (6) 為免太多訊息, 在第 58 次叫 paint()之前若是由 Hinter 引起的訊息則
// 不顯示; 第 59 次開始自動顯示, 但你可以按 STOP 按鈕使其不顯示或
// 切回要顯示 (toggle). 不過非 Hinter (負責跑馬燈和閃爍訊息) 所引起
// 的訊息時則一定會顯示.
//
// This Java program can be run both as Applet and as Application.
// To run as an Application: java SoundWin
//////////
/***** When used as an Applet, embed it in an HTML file as following: