private DefaultTableModel getTable(String currentKey, String keyStart, int currentYear, int currentMonth) {
        // Generates calendar for current month if none exists
        while (currentKey.equals("")) {
            Set<String> keys = this.scheduleMap.keySet();
            for (String key : keys) {
                if (key.startsWith(keyStart)) {
                    currentKey = key;
                    break;
                }
            }
            if (currentKey.equals("")) {
                Thread t = new Thread(this.schedule);
                t.start();
                // this.schedule.calculateNextMonth();
            }
        }

        DefaultTableModel table = new DefaultTableModel(new Object[0][0], new String[0][0]);
        this.cal = new GregorianCalendar(currentYear, currentMonth - 1, 1);

        while (currentMonth == this.cal.get(Calendar.MONTH) + 1) {
            String tempKey = this.cal.get(Calendar.YEAR) + "/"
                    + String.format("%02d", (this.cal.get(Calendar.MONTH) + 1)) + "/"
                    + String.format("%02d", this.cal.get(Calendar.DAY_OF_MONTH));
            if (this.scheduleMap.containsKey(tempKey)) {

                int numOfJobs = this.scheduleMap.get(tempKey).size();
                String[] colData = new String[numOfJobs];
                int i = 0;

                for (String key : this.scheduleMap.get(tempKey).keySet()) {
                    colData[i] = key + ": " + this.scheduleMap.get(tempKey).get(key).getName();
                    i++;
                }

                String numDate = (this.cal.get(Calendar.MONTH) + 1) + "/"
                        + String.format("%02d", this.cal.get(Calendar.DAY_OF_MONTH)) + "/"
                        + String.format("%02d", this.cal.get(Calendar.YEAR));
                String colTitle = CalendarGUI.getNameforNum(this.cal.get(Calendar.DAY_OF_WEEK)) + " (" + numDate + ")";
                table.addColumn(colTitle, colData);

            }
            this.cal.add(Calendar.DATE, 1);
        }

        return table;
    }