menuItem.addActionListener(new AbstractAction() {
private GridChemRunnerWindow window;
public void actionPerformed(ActionEvent event) {
if (this.window == null) {
this.window = new GridChemRunnerWindow(engine);
}
this.window.show();
}
});
menuItem.setEnabled(false);