title: Use of calendar class
body: <p>I have created an xml layout which is in effect a grid. I need to use it as a calendar and have read about the calendar class but i've been unable to get any of the code it suggests to work.</p>
  
  <p>How would i go about displaying the current year,month and days in the various text views?</p>
  
  <p>This is what i have so far:</p>
  
  <pre><code>Calendar c = Calendar.getInstance(); 
      int month = c.get(Calendar.MONTH);
  
      String month_name = Integer.toString(month);
  
      TextView monthdisp = (TextView) findViewById(R.id.month_disp);
  
      monthdisp.setText(month_name);
  
      setContentView(R.layout.main);
  </code></pre>
  
  <p>However a null pointer excpetion is generated at monthdisp.setText(month_name);</p>