Home J2me J2ME Calendar Application



J2ME Calendar Application
Posted on: November 19, 2008 at 12:00 AM
Creating a calendar is a very basic example to learn any programming language.

J2ME Calendar Application

     

Creating a calendar is a very basic example to learn any programming language. At our website (roseindia.net), you can find many examples on creating calendar in Java, JavaScript etc. But in this example you will learn how to create a calendar in J2ME. 

In this example we have imported java.util.Date and java.util.TimeZone, that are required to create the calendar. Further we have created a constructor of the class CalenderMIDlet, and defined the given syntax into it to create a calendar.

  public CalenderMIDlet(){
  calender = new DateField("Date In:", DateField.DATE, TimeZone.getTimeZone("GMT"));
  }

Output of the application will look like as follow..

J2ME Calendar

 

Source Code of CalenderMIDlet.java

import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
import java.util.Date;
import java.util.TimeZone;

public class CalenderMIDlet extends MIDlet{
  private Form form;
  private Display display;
  private DateField calender;  
  private static final int DATE = 0;

  public CalenderMIDlet(){
  calender = new DateField("Date In:", DateField.DATE, TimeZone.getTimeZone("GMT"));
  }

  public void startApp(){
  display = Display.getDisplay(this);
  Form form = new Form("Calender");
  form.append(calender);
  display.setCurrent(form);
  }

  public void pauseApp(){}

  public void destroyApp(boolean destroy){
  notifyDestroyed();
  }
} 

Download Source Code

Related Tags for J2ME Calendar Application:
.netjavajavascriptcprogrammingwebwebsitej2mescriptlanguagecalendarfindipexamplesthiscreatebasicexamplesiteprogramtolearnramexamlaneareilitcanmanincalasebsmnetminoscaminnetosjndaesendagemehowprocreatingxaxampsatanyisllmpldiaeaarvascrssriripthavatietcfinetcmanypleplprmindonogro


More Tutorials from this section

Ask Questions?    Discuss: J2ME Calendar Application   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.