Hi,
beginInit sets a flag to avoid rebuliding calendar's hierarchy of cells, and updating child Swing components' states (month buttons on top, scrollbars), until you call endInit. Call these to save some time when adding dates or resources in a batch.
Quote:Do we need to beginInit and endinit when we are changing anything that has to do with the calendar?
You don't have to. They will only save some time if you do a batch of large changes, like adding multiple dates to timetable view, or multiple resources to resource view.
Quote:Such as when we do the draw event or change the dates on in the timetable view?
No need to call them from custom-draw event handling if that's what you mean, since drawing code is not supposed to change calendar's state, but only present it. Not helping much around one-liners such as date changes too.
Quote:What happens if we nest begininit calls?
These toggle a boolean flag, so better do not nest the calls
Regards,
Slavcho
Mindfusion