public void ClsCommand() {
   clearSelection();
   setCursorPosition(0, 0);
   updateCaretPosition();
   midlet.clearOutput();
   setText("");
 }
  public void SwitchOutputCommand() {
    clearSelection();
    isOutput = !isOutput;
    if (isOutput) {
      removeCommand(output);
      output = new Command("Code", Command.ITEM, 5);
      addCommand(output);

      currentX = getCursorX();
      currentY = getCursorY();
      setCursorPosition(0, 0);
      updateCaretPosition();

      currentCode = getText();
      setText(midlet.getOutput());

      setAndViewStatus("Output");
    } else {
      removeCommand(output);
      output = new Command("Output", Command.ITEM, 5);
      addCommand(output);

      setText(currentCode);
      setCursorPosition(currentX, currentY);
      updateCaretPosition();

      if (currentDirName != null && currentFileName != null) {
        setAndViewStatus(currentDirName + currentFileName);
      }
    }
  }
 public void ExitCommand() {
   // Cleanup and notify that the MIDlet has exited
   midlet.destroyApp(false);
   midlet.notifyDestroyed();
 }