The two smileyface characters are ascii 0001 and ascii 0002 which are Unicode 9786 and 9787 or 263A hex and 263B hex. You have to set  a font in your TextArea which will display these Unicode Miscellaneous Sysmbols which you can view at http://charts.unicode.org/ Miscellaneous Symbols or the pdf file at  http://charts.unicode.org/PDF/U2600.pdf
The code as follows should create the two sysmbols:

  Character smileyfacecharacter1 = new Character((char)9786);
  Character smileyfacecharacter2 = new Character((char)9887);
  String smileyfacestring = smileyfacecharacter1.toString() + smileyfacecharacter2.toString() ;
  mytextareaname.append(smileyfacestring);

I have not found a font type which will work. Perhaps you can?
I attached a short java program application which tried it for one font type. Suggest you work in similar fashion and get one that works on your system.
 

Jiger Patel wrote:

Hi,
   I am making a chat Software & I want to show Smiley Symbols in my
Messages area. I used TextArea of AWT but of course it did not work. I
sub-classed it & used paint() method but it used to remove the icons once
the Frame is minimised. I am currently trying it as Application.

I also tried using Panel & Canvas but no luck same efect.

Can anybody who has any idea or has done that Help me out. It will be nice
if u could provide me some sample code. or software to understand it.

Thanks in Advance,
Jiger

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

SmileyFace.java

Reply via email to