Slide 3.19: Other interfaces
  Slide 4.1: Programming Exercise I: my memento by using J2ME
  Home


Other Interfaces (Cont.)


final Alert soundAlert = new Alert( "sound Alert" );
soundAlert.setType( AlertType.ERROR );
The method public void setType(AlertType type) sets the type of the Alert. The handling and behavior of specific AlertTypes is described in AlertType. An ERROR AlertType is a hint to alert the user to an erroneous operation.

soundAlert.setString( "** ERROR **" );
The method public void setString(String str) sets the text string used in the Alert.

java.util.Date now = new java.util.Date( );
date.setDate( now );
The method public void javax.microedition.lcdui.DateField.setDate(Date date) sets a new value for this field.