Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Beep, beep, yeah!
It isn't too difficult to use sound files in Java applets or applications, but sometimes we just want to sound a warning beep.
We can use the system's default beep, by using the beep()
method in the Toolkit
class.
So if we want to sound a simple beep we only have to use this code:
Toolkit.getDefaultToolkit().beep();The following applet demonstrates the use of this method. When we press the button we will hear a beep sound from the computer.