import java.awt.*; import java.awt.event.*; /** A sample implementation of a command object. It simply opens a file choosing dialog. */ public class TestCommand3 extends Command { public void Execute() { Frame frame = new Frame("Test Command 3"); frame.setSize(400,150); frame.setLayout(new GridLayout(0,1)); frame.add(new Label("You have activated Test Command 3.",Label.CENTER)); frame.add(new Label("Shut the FileChooser-Dialog to close this window.",Label.CENTER)); frame.add(new Label("Nothing will happen to the file you choose - it's just a test.",Label.CENTER)); frame.show(); FileDialog filedialog = new FileDialog(frame,"TestDialog"); filedialog.show(); frame.dispose(); } }