for (String chapter : pageChapters) {
boolean active = Suggestion.isChapterActive(page, chapter);
JMenuItem chapterItem = new JCheckBoxMenuItem(chapter);
chapterItem.setSelected(active);
chapterItem.setActionCommand(page + "#" + chapter);
chapterItem.addActionListener(EventHandler.create(
ActionListener.class, this,
active ? "actionCheckSpellingDeactivateChapter" : "actionCheckSpellingActivateChapter",
"actionCommand"));
pageMenu.add(chapterItem);
}