How can I show unicode characters from range \u0900 to \u097F in TextArea? They are not visible in TextArea, but JTextArea shows them properly. Is there any way to show them properly, as intended in TextArea? TIA, - Manish
I'm not real good with this stuff don't optional character support installed on my workstation, so I cannot check out what I'm saying, but ... Have you specified a font that includes Devaganari? Is that font configured for use with the native windowing system on your computer (e.g, Windows or Motif). If not, it may be substituting a font that does not support those characters. If you are using Windows, you might use the character map accessory to see if the font you selected is present and supports those characters.
Thanks John, I am using windows 2000, and font is standard "dialog" font of Java, and I just intend to display all the available chracters. My questions is why it works with JTextArea and not with TextArea? I thought Java awt compoents had unicode support since very begining. Does anybody know if it's a known issue or sth... - Manish
posted 17 years ago
I would think that for AWT components, the glyphs generation is completely under control of the the underlying operating system. So if whatever font your system uses for "dialog" (ariel on my machine) does not have glyphs for these characters, you won't see them. In Swing, the glyphs are generated and placed in the bitmap representing the screen within the Java environment, which can be configured to map and support the fonts differently. (See jre/lib/font.properties .) I'm pretty sure that on my machine, none of the fonts currently installed include the Devanganari characters, so I would not expect to see them in either Swing or AWT widgets, even though Unicode is supported. I expect your machine has some fonts that support Devanganari, and some that don't. If Windows machine, you should be able to use the Character Map accessory to see that.
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad: