![]() |
Zhuyin is a system to describe how you read Chinese characters. In Taiwan, textbooks, dictionaries and signs are all use the Zhuyin alphabets. The Zhuyin alphabets are used to enter Chinese characters for cell phone and computer keyboard in Taiwan. Zhuyin is a phonetic system and each character in the Zhuyin represents either a vowel or a consonant, or a tone.
The applet below is an online Zhuyin editor. You may have to "allow blocked content" if your browser is set not to use Java applets. In case of Internet Explorer, right click on the bar at the top and then select "Allow Blocked Content" prior to run the applet.
In case you want to use my OnScreenKeyboard class, download (easai.jar). The OnScreenKeyboard class is in easai.util package so import the package to use the class.
import easai.util.*; ... OnScreenKeyboard keyboard =new OnScreenKeyboard("Taiwanese",this); keyboard.init();
OnScreenKeyboard constructor takes a string argument that specifies the language and an ActionListener. This ActionListener is a wonderful thing that makes this component usable for any of the application you wish. You just have to set the ActionListener to receive all the output from the OnScreenKeyboard application.
public void actionPerformed (ActionEvent e) { String command=e.getActionCommand(); String ch=command.substring(0,1); int pos=textArea.getCaretPosition(); textArea.insert(ch,pos); }
The code below shows the way Java applet above uses the OnScreenKeyboard class.
Then compile your Java application with a proper classpath option.
javac -classpath "easai.jar" *.java
Erica Asai
Last Modified: Fri Jan 25 06:43:47 2008