mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
add ESC and cmd/ctrl-W to the Examples window
This commit is contained in:
@@ -588,6 +588,12 @@ public abstract class Mode {
|
||||
public void showExamplesFrame() {
|
||||
if (examplesFrame == null) {
|
||||
examplesFrame = new JFrame(getTitle() + " Examples");
|
||||
Toolkit.registerWindowCloseKeys(examplesFrame.getRootPane(), new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
examplesFrame.setVisible(false);
|
||||
}
|
||||
});
|
||||
|
||||
final JTree tree = buildExamplesTree();
|
||||
|
||||
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
|
||||
|
||||
Reference in New Issue
Block a user