Results 1 to 9 of 9
- 11-10-2010, 04:39 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
- 11-10-2010, 05:17 AM #2
the default toolkit beep uses the os system alert, not the mother board beep.
if you out put the ascii bell (no. 7) to the command line (system.out.println) you should get a beep on the mother board
- 11-10-2010, 05:39 AM #3
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
Ah okay thanks for the information. I forgot to tell but I also tried your suggestion but still no beep at all. What could be the problem?
- 11-10-2010, 05:41 AM #4
what os are you using?
can u normally here the beep from other programs?
if you put "echo ^G" into a terminal / command prompt you should hear it
(^g achieved by holding ctrl + g)
- 11-10-2010, 05:44 AM #5
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
Ahm Windows. Yes I heard the beep.
- 11-10-2010, 05:46 AM #6
ok...
whats the code your using to try and generate the beep?
post it here
and is there any output at all to command line?
- 11-10-2010, 05:53 AM #7
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
Here's the code:
if (product == null) {
System.out.println("beep here");//debug
//Toolkit.getDefaultToolkit().beep();
//System.out.print( '\u0007' );
//System.out.print( (char)0x07 );
System.out.println("\007");
System.out.flush();
javax.swing.JOptionPane.showMessageDialog(null, "Product does not exists");
}
There is no output when I print character 7.
- 11-10-2010, 06:02 AM #8
should work when you run it in command prompt.Java Code:System.out.print("\007"); System.out.flush();
however, It doesnt work in netbeans, it just prints a space - not sure why.
Did you run that program in an IDE or from command prompt?
- 11-10-2010, 06:05 AM #9
Member
- Join Date
- Nov 2010
- Posts
- 6
- Rep Power
- 0
Similar Threads
-
Sun Toolkit
By David55 in forum Sun Java Wireless ToolkitReplies: 7Last Post: 05-07-2009, 06:04 PM -
about SWT toolkit
By MarkWilson in forum New To JavaReplies: 2Last Post: 10-17-2008, 07:03 PM -
Java ME beep(frequency, time)
By Morfmor in forum New To JavaReplies: 2Last Post: 08-28-2008, 10:34 PM -
Beep
By JavaLerner in forum New To JavaReplies: 3Last Post: 07-16-2008, 10:17 AM -
How to beep every 5 minutes in Java
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:40 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks