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 / First Aid / May 2004

Tip: Looking for answers? Try searching our database.

Print BEL character in applet

Thread view: 
Campos - 05 May 2004 19:25 GMT
Hi all,

Is there any way to display the BEL character (ASCII code 7) in an
applet embeded in a HTML page.
I've made some tests with GraphicsEnvironment:
1 - I called the getFontsList() from GE.
2 - For each Font returned i've called the method canDisplayChar(
(char) 7 )
3 - That method returned true only for Batanga font.
4 - I've tried to set the Batanga font in a JTextArea and set the text
of that TextArea to include the char code 7.

But, no beep is produced by the speaker of the computer. I've also
tested with getToolkit.beep() but what i really want is to produce the
beep from BEL character, as the HTML page with the applet is to be
used in a thin client environment acessing a remote Windows 2003
Server (using RDP) and the thin clients don't even have a speaker,
only a beeper.

If someone could help, it would be appreciated.

Best regards,
Campos
Chris Smith - 05 May 2004 19:45 GMT
> Is there any way to display the BEL character (ASCII code 7) in an
> applet embeded in a HTML page.

You can certainly display it, but you're unlikely to find a font that
maps a glyph to it.  You're likely to get one of those little square
boxes indicating the lack of an appropriate glyph in the font.

> But, no beep is produced by the speaker of the computer. I've also
> tested with getToolkit.beep() but what i really want is to produce the
> beep from BEL character, as the HTML page with the applet is to be
> used in a thin client environment acessing a remote Windows 2003
> Server (using RDP) and the thin clients don't even have a speaker,
> only a beeper.

So it appears you don't want to display it, but rather want to cause a
beep; and you're furthermore convinced that you want to use an ASCII
code 7 to do so.

That's too bad, because you can't accomplish that latter goal.  The beep
behavior attached to the BEL ASCII code is a feature of certain command
prompts and terminals.  It goes without saying that unless you are
speaking to a command prompt or terminal that implements this feature,
the feature won't work.

I'd expect that on a PC-architecture system with no external sound
interface, the default toolkit's beep would use the internal speaker (if
it's present).  If not, then you'll have to resort to something more
system-specific (such as JNI) to cause the beep.

Signature

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Roedy Green - 05 May 2004 20:57 GMT
>> But, no beep is produced by the speaker of the computer. I've also
>> tested with getToolkit.beep() but what i really want is to produce the
>> beep from BEL character, as the HTML page with the applet is to be
>> used in a thin client environment acessing a remote Windows 2003
>> Server (using RDP) and the thin clients don't even have a speaker,
>> only a beeper.

see http://mindprod.com/products.html#SPEAKER
requires JNI and applet signing though.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


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.