Programa java

Solo disponible en BuenasTareas
  • Páginas : 3 (666 palabras )
  • Descarga(s) : 0
  • Publicado : 18 de agosto de 2012
Leer documento completo
Vista previa del texto
package paquete;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.Vector;

importjavax.microedition.io.Connector;
import javax.microedition.io.file.FileConnection;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Command;
importjavax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.TextBox;
importjavax.microedition.midlet.MIDlet;

public class CreateDirectory extends MIDlet implements CommandListener {

private Command exitCommand; // The exit command
Command continuar;

private Display display;// The display for this MIDlet

Alert MensajeError, MensajeAdvertencia;

public CreateDirectory() {

display = Display.getDisplay(this);
exitCommand = newCommand("Exit", Command.EXIT, 0);
continuar = new Command("Continuar",Command.OK,1);
}

public void startApp() {

String fileName3= "ese";

String fileName= "codigo.txt";
String fileName2 = "codi.exe";

String dirName = "documentos";

TextBox t = new TextBox("Hello", "", 256, 0);t.addCommand(exitCommand);
t.setCommandListener(this);
t.addCommand(continuar);
t.setCommandListener(this);
readFile(fileName);
writeTextFile();
//creating directory//createFile();

// if(this.makeDirectory(dirName)){
//t.setString(" Bienvenidooooo ");

//MensajeError = newAlert("Mensaje de Error","Si hay archivos...",null,AlertType.INFO);
//MensajeError.setTimeout(2000);
//display.setCurrent(MensajeError);

//t.setString("Directory "+dirName+"...
tracking img