Here's a simple example:
1. Drag a button, 2 staticText fields, and a calendar onto the designer
2. Double click the button and add the following source to the action() method:
java.util.Date chosenDate = calendar1.getSelectedDate();
java.util.Calendar calDate = java.util.Calendar.getInstance();
calDate.setTime(chosenDate);
java.util.Calendar gregDate = new java.util.GregorianCalendar();
gregDate.setTime(chosenDate);
staticText1.setValue(calDate.get(calDate.DAY_OF_MONTH) + "");
staticText2.setValue(gregDate.get(gregDate.DAY_OF_MONTH) + "");
3. deploy/run
Select a date from the calendar and press the button. The staticText fields should reflect the day of month selected.