To handle the action events of MSketchPane, the java.awt.event.ActionListener interface must be implemented.
| Source name | Meaning |
|---|---|
"close" |
File/Close has been chosen, the sketcher window should be closed. |
"transfer" |
The Transfer button on the General Toolbar has been clicked. |
sketchPane.addActionListener(this);
...
public void actionPerformed(ActionEvent ev) {
if("close".equals(ev.getActionCommand())) {
dispose();
}
}