GUI代碼部分
/**
* @(#)CnToSpellGUI
* kindani
*
* */
import java
import java
import javax
import javax
/**
*
*
* @author KIN
* @version
* @see
* @since
*/
public class CnToSpell
private CnToSpell
public CnToSpell
super(
setSize(
getContentPane()
// component layout
JTextArea from = new JTextArea(
JTextArea to = new JTextArea(
JButton b = new JButton(
getContentPane()
getContentPane()
getContentPane()
getContentPane()
getContentPane()
// action handle
b
setVisible(true);
// set this for pack
c = this;
}
/**button action listener to convert text to pinyin from one textbox to another textbox*/
class Cn
private JTextArea from = null;
private JTextArea to = null;
public Cn
this
this
}
public void actionPerformed(ActionEvent e) {
if (from
JOptionPane
}
String text = from
to
c
}
}
public static void main(String [] args) {
CnToSpell
}
}
/**
* @(#)CnToSpell
*
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19554.html