public void loadKompetenser() {
        PanelHelper.cleanPanel(kompetensHolderPanel);
        Dimension d = kompetensHolderPanel.getPreferredSize();
        d.setSize(400, 10);
        kompetensHolderPanel.setPreferredSize(d);
        ArrayList<HashMap<String, String>> a1 = null;
        try {
            String query = "select KOMPETENSDOMAN.KID, HAR_KOMPETENS.KOMPETENSNIVA KOMPNIVA, PLATTFORM.PID from KOMPETENSDOMAN"
                    + " join HAR_KOMPETENS on HAR_KOMPETENS.KID=KOMPETENSDOMAN.KID"
                    + " join ANSTALLD on ANSTALLD.AID=HAR_KOMPETENS.AID"
                    + " join PLATTFORM on PLATTFORM.PID=HAR_KOMPETENS.PID"
                    + " where ANSTALLD.AID=" + selectedAnstalld;
            a1 = DB.fetchRows(query);
        } catch (InfException e) {
            e.getMessage();
        }
        if (a1 != null) { //creates panels of the database results
            for (int i = 0; i < a1.size(); i++) {
                AnstalldKompetensShowUpdater kompShow = new AnstalldKompetensShowUpdater(new AnstalldKompPlattNiva(new Kompetensdoman(Integer.parseInt(a1.get(i).get("KID"))), new Plattform(Integer.parseInt(a1.get(i).get("PID"))), Integer.parseInt(a1.get(i).get("KOMPNIVA"))), selectedAnstalld, this);
                PanelHelper.addPanelToPanel(kompShow, kompetensHolderPanel, 350, 25); //make panels of the results
                d.setSize(d.getWidth(), (d.getHeight() + 30));
                kompetensHolderPanel.setPreferredSize(d);
            }
        }

    }