Java SE/Beep Sound
Java Beep Sound
Soul-Learner
2009. 4. 6. 22:31
import java.awt.*;
class BeepTest
{
public static void main(String[] args){
while(true) {
System.out.print ("\007" );
System.out.flush ();
// 위의 방법으로 비프사운드가 발생하지 않는다면 다음 방법으로...
Toolkit.getDefaultToolkit().beep(); /*사운드 카드 이용 */
try{ Thread.sleep(500); }catch(Exception _ex) { }
}
}
}