devxlogo

Get the Attention of a User with a Beep

Get the Attention of a User with a Beep

Getting the attention of a user is easily achieved in Java with the following code.

Listing 1.

public class Beep{   public static void main(String args[])   {      Beep beep = new Beep();      beep.proceed();   }      private void proceed()   {      java.awt.Toolkit.getDefaultToolkit().beep();   }}

devx-admin

Share the Post: