这两天当中,有幸接触了监视器这玩意,感觉挺好玩的,来发表下感慨:
ActionListener action_Zhuce=new ActionListener(){
public void actionPerformed(ActionEvent e){
String command=e.getActionCommand();
if(command.equals("确定")){
JOptionPane.showMessageDialog(null,"帐号注册成功");
ZhuceFrame.setVisible(false);
showLoginFrame();
}else{
JOptionPane.showMessageDialog(null,"退出了程序");
}
}
};
button_cancel.addActionListener(action_Zhuce);
button_sure.addActionListener(action_Zhuce);
}
事实上,这几行代码花了菜鸟一个多钟头的事件,一些小的细节就被卡了,总的来说整体的思路还是
比较清晰的,测试的时候有些好玩和激动,美中不足的是这几段代码简单了点(本身只能做这些),但这只是开始,
拭目以待吧