Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer
 Mr.Haki's JBuilder Jar #21
See Also: JBuilder Papers

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:

The following applet demonstrates the use of this method. When we press the button we will hear a beep sound from the computer.

Your browser doesn't support applets.
Maybe you could try using Netscape Navigator 4.5 (or higher).

This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - All Rights Reserved.