// Crude java-like version by Albert Cardona importClass(Packages.java.util.ArrayList); commands = Menus.getCommands(); keys = new ArrayList(commands.keySet()); gd = new GenericDialog("Command Launcher"); gd.addStringField("Command: ", ""); prom = gd.getStringFields().get(0); importClass(Packages.java.awt.Color) prom.setForeground(Color.red); // Create a body for the interface TextListener, // since 'new' cannot be called directly on an interface body = { textValueChanged: function(evt) { text = prom.getText(); for (i=0;i