一、在UI界面中添加事件,我这里添加的是鼠标点击事件 二、然后在UI代码中将添加的事件扩展出来 protected void kDButton1_mouseClicked(MouseEvent e) throws Exception { }