public LocomotivesAction() {
super("Locomotives\u2026", createImageIcon("locomotive.png"));
}
public void actionPerformed(ActionEvent e) {
LocomotiveConfigurationDialog locomotiveConfigDialog = new LocomotiveConfigurationDialog(
AdHocRailway.this);
if (locomotiveConfigDialog.isOkPressed()) {
updateLocomotives();
updateCommandHistory("Locomotive configuration changed");
}
}