private void getActivities() {


        String[] temp = manager.getActivityNames();
        activityNames = new String[temp.length + 1];
        activityNames[0] = "<New>";
        for (int i = 0; i < temp.length; ++i) {
            activityNames[i + 1] = temp[i];
        }

        if (activityList != null) {
            activityList.setModel(new javax.swing.AbstractListModel() {
                String[] strings = activityNames;

                @Override
                public int getSize() {
                    return strings.length;
                }

                @Override
                public Object getElementAt(int i) {
                    return strings[i];
                }
            });
            this.repaint();

            if (editingAct != null) {
                int res = Arrays.binarySearch(activityNames, editingAct.getName());
                if (res >= 0) {
                    activityList.setSelectedIndex(res);
                } else {
                    activityList.setSelectedIndex(0);
                }
            } else {
                activityList.setSelectedIndex(0);
            }
        }


    }