Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2005

Tip: Looking for answers? Try searching our database.

Annoying beeps - is there a way to prevent them?

Thread view: 
Aki \ - 15 Feb 2005 13:46 GMT
Hi group,

Is there any way to tell a Java application _not_ to emit a beep
whenever an exception occurs?
I'm working on a program (mostly finished, but not completely) that has
already been put to limited use, and there's the aforementioned problem
- it *does* still have a few bugs, some of which cause an exception to
occur, and these produce an annoying beep. For the convenience of the
beta-version users, is there some way to silence it apart from pulling
the speaker plug from the motherboard?

Signature

-Aki "Sus" Laukkanen

Chris Smith - 15 Feb 2005 14:59 GMT
Aki "Sus" Laukkanen <aki.laukkanenREMOVETHIS@helsinki.fi> wrote:
> Is there any way to tell a Java application _not_ to emit a beep
> whenever an exception occurs?

Your question would make sense, except that Java applications don't emit
a beep whenever an exception occurs.

It sounds like, somewhere in your application, you are catching
exceptions and calling Toolkit.getDefaultToolkit().beep().  Perhaps if
you search your code for the word "beep", you can find and remove the
offending code.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Boudewijn Dijkstra - 18 Feb 2005 21:27 GMT
"Aki "Sus" Laukkanen" <aki.laukkanenREMOVETHIS@helsinki.fi> schreef in bericht
news:cusug0$iil$1@oravannahka.helsinki.fi...
> Hi group,
>
> Is there any way to tell a Java application _not_ to emit a beep whenever an
> exception occurs?

Override java.awt.Toolkit.beep()
Roland - 19 Feb 2005 09:46 GMT
> "Aki "Sus" Laukkanen" <aki.laukkanenREMOVETHIS@helsinki.fi> schreef in bericht
> news:cusug0$iil$1@oravannahka.helsinki.fi...
[quoted text clipped - 5 lines]
>
> Override java.awt.Toolkit.beep()
I can't say this is impossible, but it would be rather difficult, since
Java installs a platform dependent Toolkit instance. On Windows it
happens to be sun.awt.windows.WToolkit (System property 'awt.toolkit').
The implementation of the beep() method probably uses a native OS call
to generate the sound.
Signature

Regards,

Roland de Ruiter
  ___      ___
 /__/ w_/ /__/
/  \ /_/ /  \

Rob Kenworthy - 16 Mar 2005 02:13 GMT
Sounds to me like you are using an IDE like JBuilder which, I believe,
makes a beep noise whenever an exception is thrown while running a program
through the IDE. Check out your IDE settings to prevent this. If there is
no setting, you might be able to suppress the noise by adjusting the
windows sounds associated with various actions (i.e. sounds and multimedia
in control panel). Good luck.

Rob

-----------------------------------------------------
Check out http://jsourcery.com for javadocs and source code.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.