Can an Applet beep?

  • Thread starter Dirk Bruere at NeoPax
  • Start date
A

Andrew Thompson

Can an Applet beep?

Please repeat the crux of the subject line,
within the body of the post..
An unsigned one, that is.

<sscce>
import java.awt.Toolkit;
import java.awt.event.*;
import javax.swing.*;

public class BeepApplet extends JApplet {
public void init() {
JButton beep = new JButton("Beep");
beep.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
Toolkit.getDefaultToolkit().beep();
}
});
add(beep);
validate();
}
}
</sscce>

Tested in AppletViewer, IE & FF on Win XP using Java 1.6
(un'Jar'd let alone signed) - successful. Though I
would expect similar results on other combos.
 
D

Dirk Bruere at NeoPax

Roedy said:

Thanks for the replies guys.
I had asked a similar question before and got my non-Applet app beeping,
but the real thing is quiet.

I'll try out the suggestions.
But right now it's Friday night, I've just had a pizza and 2 glasses of
red wine and my focus is wandering...

--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Official Java Classes 10
Free keyboard applet 5
Sorting a JList 4
Invisible applet 29
Java in Java 10
File over network timeout 3
Accessing static field 21
Delay 2

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top