private void updatePopup() { int count = myBalloonPanel.getComponentCount(); List<NotificationType> types = new ArrayList<NotificationType>(count); for (int i = 0; i < count; i++) { types.add( (NotificationType) ((JComponent) myBalloonPanel.getComponent(i)).getClientProperty(TYPE_KEY)); } myListener.run(types); if (myVisible) { layoutPopup(); } }