Article View: borland.public.jbuilder.java.swing
Article #10258Re: Display Chinese Characters in JTextField or JTextArea etc
From: Kevin Wang
Date: Wed, 20 Oct 1999 00:00
Date: Wed, 20 Oct 1999 00:00
71 lines
3339 bytes
3339 bytes
Hi Neo: I'm new to displaying other language characters so I have a simple question if you can help it would be great! I'm trying to load a generic text file (a properties file with keys and values) with characters in any language. Once I loaded them into a properties object I display them as menu items under a menu. Anyway, since that text file is generic in any language, I'm just wondering if the characters in the file should be in unicode, OR can it just be written in the character of that language(e.g. if the language is Chinese do I have to write them in unicode OR can I just write in Chinese characters)? Thanks very much K W Lois Neo wrote: > Hi, > Maybe I didn't explain my situation clearly. Let me try again. > > Actually I not only want to display chinese characters, I also want to the > app to be able to accept chinese characters input. I'm not able to figure > out how the Input Method framework works, but currently using the > cut-and-paste method. > Thus, it would not be possible to keep a resource bundle or properties file > for this purpose (as what is done in the IntlDemo). > > The problem is it is difficult to follow the help file on the > Internationalization. It is not very clear as to what should be done for > like in my case. The font.properties file is only found under the jre/lib > directory, would it be used if we run the app using the java.exe from the > $JAVAHOME/bin directory instead of $JAVAHOME/jre/bin? > > The JTextArea and JTextField in my app would be used to display and accept a > mix of english and chinese characters. Would the thing work if the input > characters were converted to unicode? and how should it be done? > > I would appreciate if someone could give a working example to my case. > Thanks very much. > Lois > > Wendy Lin <wlin@borland.com> wrote in message > news:7uj2bf$s244@forums.borland.com... > > Lois: > > > > Swing should be able to display Chinese character provided that you have > > the correct fonts and modify your font.properties file so the "fonts" are > > installed. It's pretty neat because if you do it properly, you won't > have > > to run Chinese star. It'll just display. > > > > For more information, check out intlDemo in your JBuilder's sample > > directory. Also read up in the help file (international section.) > > > > --Wendy > > JBuilder QA > > > > -------------------------------------------------------------------- > > I believe we should share the knowledge. So, private e-mail sent > > to me won't bounce but it will als not be answered. > > ------------------------------------------------------------------- > > > > > >
Technical Details
Message-ID:
<380DC841.FE608D5@mks.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7uhr5l$ha99@forums.borland.com> <7uj2bf$s244@forums.borland.com> <7uj89q$s229@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,68e7b9b264b14ab6 X-Google-Attributes: gid111d45,public From: Kevin Wang <kwang@mks.com> Subject: Re: Display Chinese Characters in JTextField or JTextArea etc Date: 1999/10/20 Message-ID: <380DC841.FE608D5@mks.com> X-Deja-AN: 538422191 Content-Transfer-Encoding: 7bit References: <7uhr5l$ha99@forums.borland.com> <7uj2bf$s244@forums.borland.com> <7uj89q$s229@forums.borland.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Mortice Kern Systems Inc. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing