private void updateSpelprojektInPanel() {
        tfSpelprojectSearch.setEnabled(false);
        PanelHelper.cleanPanel(spelprojectHolderPanel); // do some cleanup before
        ArrayList<String> matches = fetchMatchingSpelproject();
        if (!matches.isEmpty()) {
            for (String st : matches) {
                HashMap<String, String> hm = fetchSpelprojektInfo(st);
                if (hm != null) {
                    PanelHelper.addPanelToPanel(new SpelprojektPanelViewbox(hm.get("SID"), hm.get("BETECKNING"), hm.get("RELEASEDATUM"), hm.get("STARTDATUM")), spelprojectHolderPanel, 150, 120);
                } else {
                    JPanel panel = new JPanel();
                    panel.add(new JLabel("Something went wrong with your search"));
                    panel.setVisible(true);
                    PanelHelper.addPanelToPanel(panel, spelprojectHolderPanel, 500, 200);
                }
            }
            Dimension d = spelprojectHolderPanel.getPreferredSize(); //set the scroll to the right size
            int count = matches.size();
            int height = count * 125 / 3;
            if (count % 3 != 0) {
                if (count % 3 == 1) {
                    height += 88;
                }
                if (count % 3 == 2) {
                    height += 44;
                }
            }
            d.setSize(500, height); //sets the size of the panel to the right preferred size
            spelprojectHolderPanel.setPreferredSize(d);
        } else { // we found nothing that matched
            JPanel panel = new JPanel();
            panel.add(new JLabel("None matched your search, try to make your search more generic"));
            panel.setVisible(true);
            PanelHelper.addPanelToPanel(panel, spelprojectHolderPanel, 500, 200);
            Dimension d = spelprojectHolderPanel.getPreferredSize();
            d.setSize(500, 100);
            spelprojectHolderPanel.setPreferredSize(d);
        }

        tfSpelprojectSearch.setEnabled(true);
    }