cmdBlue.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ String s = e.getActionCommand(); txt.setBackground(Color.blue); txt.setText(s); } }); cmdGreen.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ String s = e.getActionCommand();
txt.setBackground(Color.green); txt.setText(s); } }); } public void setCmdRed(String s){ cmdRed.setText(s); } public void setCmdBlue(String s){ cmdBlue.setText(s); } |
閺€鎯版閹存劕濮�閺屻儳婀呴弨鎯版>>
正在阅读:实战Java用户界面本地化实战Java用户界面本地化
2004-02-14 09:34
出处:PConline
责任编辑:linjixiong
键盘也能翻页,试试“← →”键