[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: How to make a beep sound?

Another possibility is to print out the beep:

  System.out.println("\u0007");

This will emit beep in the system beeper.

Joonas Haapsaari

"Jim Sculley" <niceguy@xxxxxxxxxxx> wrote in message
news:3B7D4B4D.80508@xxxxxxxxxxxxxx
> Miriam Ford wrote:
> > Hello,
> >
> > I'm trying to make a beep sound when a part of my code is executed and
> > I haven't been able to get it to work.  I've tried using the following
> > statements with no luck:
> >
> > shell.getDisplay().beep();        // shell is a Shell object
> > Display.getCurrent().beep();
> >
> > Thanks for your help.
>
> Java has this capability built in:
>
> Toolkit.getDefaultToolkit().beep()
>
> Jim S.
>