Skip to content

Action Events

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.
1
2
3
4
5
6
7
8
sketchPane.addActionListener(this);
    ...

public void actionPerformed(ActionEvent ev) {
    if("close".equals(ev.getActionCommand())) {
 dispose();
    }
}