Code Sample: Displaying A Screen That Lets Blackberry Device Users Add New Contacts - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVICE APPLICATIONS INTEGRATION - DEVELOPMENT GUIDE Integration Manual

Blackberry device applications integration guide
Table of Contents

Advertisement

}
// Save the appointment to the Calendar.
event.commit();
//reset fields on screen
_subject.setText("");
_location.setText("");
_endTime.setDate(null);
_startTime.setDate(null);
_repeat.setSelectedIndex(0);
return true;
} catch (PIMException e) {
System.err.println(e);
}
return false;
}
private RepeatRule setRule() {
RepeatRule rule = new RepeatRule();
int index = _repeat.getSelectedIndex();
if (index == 0) {
}
if (index == 1) {
}
if (index == 2) {
}
if (index == 3) {
}
return rule;
}
protected void makeMenu(Menu menu, int instance)
menu.add(_saveMenuItem);
menu.addSeparator();
super.makeMenu(menu, instance);
}
}
}
Code sample: Displaying a screen that lets BlackBerry device users add new
contacts
The following sample demonstrates how to display a screen that lets BlackBerry® device users add new contacts
to the address book.
Example: ContactsDemo.java
/**
* ContactsDemo.java
* Copyright (C) 2002-2005 Research In Motion Limited.
rule.setInt(RepeatRule.FREQUENCY, RepeatRule.DAILY);
rule.setInt(RepeatRule.FREQUENCY, RepeatRule.WEEKLY);
rule.setInt(RepeatRule.FREQUENCY, RepeatRule.MONTHLY);
rule.setInt(RepeatRule.FREQUENCY, RepeatRule.YEARLY);
4: Code samples
{
45

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment 4.6.0

Table of Contents