10 Oct

Tutorial Java ME 2 – Part 2 Date Field

Contoh penggunaan DateField pada Form Java ME – J2ME

public class DateFieldDemo extends Form {

    public DateFieldDemo() {
        super("DateField Demo");
        
        DateField df1 = new DateField("DATE: ", DateField.DATE);
        DateField df2 = new DateField("TIME:", DateField.TIME);
        DateField df3 = new DateField("DATETIME:", DateField.DATE_TIME);
        
        append(df1);
        append(df2);
        append(df3);                
    }
    
}