Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing beep



These are working fine for me on 6C115; can you be more specific?


This adaptation of your code doesn't work for me.
It prints 'beep' each time the button is pressed with no sound.

package com.example.beep;

import java.awt.*;
import java.awt.event.*;

public class Beep extends Frame
{
public Beep()
{
Button b = new Button("beep");
b.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.out.println("beep");
Toolkit.getDefaultToolkit().beep();
}
});
setLayout(new FlowLayout());
add(b);
}

public static void main(String[] args)
{
new Beep().setVisible(true);
}
}

MacOS X 10.1.5.
iMac G4/700 768Mb RAM

--
----------------------------------------------------------
Out of the 10Base-T, through the router, down the T1, over the
leased line, off the bridge, past the firewall... nothing but Net.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Missing beep (From: Matt Drance <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.