fireContentsChanged(this, 0, getSize());
}
public void addSection() {
DialogSection newSection = new DialogSection("New section");
elements.add(newSection);
filteredElements.add(newSection);
sectionsList.setPreferredSize(new Dimension(250, sectionsList.getModel().getSize() * 18));
setSection(newSection);
fireContentsChanged(this, 0, getSize());