一个简单的进制转换窗体程序:class CChange implements ActionListener{ public void actionPerformed(ActionEvent e){ String s = TextField1.getText().toString(); int x = 0; for(char c: s.toCharArray()) x = x * 2 + (c == '1' ? 1 : 0); TextField2.setText(String.value