mm no me sale eso de .getday();
hasta el momento tengo esto:
import com.nokia.mid.sound.Sound;
import java.util.Date;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.DateField;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Noe
*/
public class NombreDelTxt extends Form implements CommandListener {
private TextField txtNombre;
private Command Guardar;
private CronoMusic midlet;
public String[] array = new String[100];
private int Vueltas;
private DateField cFecha;
public NombreDelTxt(CronoMusic m,String Array[],int vueltas)
{
super("Resultados");
midlet = m;
array = Array;
Vueltas = vueltas;
//obtener fecha beta
cFecha = new DateField( "",DateField.DATE);
Date fechaactual = new Date(); // Creo un objeto Date con fecha actual
cFecha.setDate( fechaactual );
cFecha.setLabel(cFecha.getDate().toString());
//fin de obtener fecha
txtNombre = new TextField("Nombre",cFecha.getLabel(),30,TextField.ANY);
Guardar= new Command("Guardar",Command.OK,1);
this.append(txtNombre);
this.addCommand(Guardar);
this.setCommandListener(this);
}
public void commandAction(Command c, Displayable dsplbl) {
if(c==Guardar)
{
String nombre = txtNombre.getString();
System.out.println("nombre = "+nombre);
//midlet.setBrowser(array,nombre,false,Vueltas);
}
}
}
ya muestron en el textfeild la fecha pero con el formato: sat aug 14 00:00:00 utc 2010.
estoy usando netbeans y abjao de
Date fechaactual = new Date(); // Creo un objeto Date con fecha actual
intento poner:
Date dia = fechaactual.getDay
para guardar el dia pero me marca error de que no puede encontrar el simbolo getDay();