private void updateGUI() {
		m_itemContainer.removeAll();

		ZonedDateTime last = null;
		Iterator<CalendarItem> it = m_calendarItems.keySet().iterator();
		while (it.hasNext()) {
			CalendarItem item = it.next();
			if (!m_calendarItems.get(item).isVisible())
				continue;
			ZonedDateTime newer = item.getStartDate();
			if (last == null) // if this is the first visible item
			{
				last = newer;
				m_calendarItems.get(item).setDrawDate(true);
			} else if (last.truncatedTo(ChronoUnit.DAYS).isEqual(newer.truncatedTo(ChronoUnit.DAYS))) // same day, don't repeat the drawing
			{
				m_calendarItems.get(item).setDrawDate(false);
			} else {
				last = newer;
				m_itemContainer.add(Box.createRigidArea(new Dimension(0, 20)));
				m_calendarItems.get(item).setDrawDate(true);
			}
			m_itemContainer.add(m_calendarItems.get(item));
		}

		today.setText(ApplicationSettings.getInstance().getLocalizedMessage("lv.today"));
		threedays.setText("3 " + ApplicationSettings.getInstance().getLocalizedMessage("lv.days"));
		fivedays.setText("5 " + ApplicationSettings.getInstance().getLocalizedMessage("lv.days"));
		week.setText(ApplicationSettings.getInstance().getLocalizedMessage("lv.week"));
		String dateText = m_currentWeek.format(DateTimeFormatter.ofPattern("dd/MM/yyyy"));
		dateText += "   -   " + m_currentWeek.plusDays(m_dayAmount - 1).format(DateTimeFormatter.ofPattern("dd/MM/yyyy"));
		m_datePicker.setText(dateText);

		// display a message if no active calendars
		if (m_itemContainer.getComponentCount() == 0)
			if (m_model.getCalendars().size() == 0) {
				m_itemContainer.add(new WebLabel(ApplicationSettings.getInstance().getLocalizedMessage("tv.nocal")));
			} else {
				m_itemContainer.add(new WebLabel(ApplicationSettings.getInstance().getLocalizedMessage("tv.noitem")));
			}

		m_container.revalidate();
		m_container.repaint();
		revalidate();
		repaint();
	}