private void addPlattform() {
        lblError.setVisible(false);
        Plattform selPlat = (Plattform) cbAvaliblePlattformar.getSelectedItem();
        DefaultListModel<Plattform> dlm = (DefaultListModel<Plattform>) listPlattformarHolder.getModel();
        boolean exists = false; // check if the plattform is already added
        for (int i = 0; i < dlm.getSize() && !exists; i++) {
            if (selPlat.getPid() == dlm.get(i).getPid()) {
                exists = true;
            }
        }
        if (!exists) { //if it wasnt added, we add it
            try {
                String query = "insert into innefattar (pid,sid) values(" + selPlat.getPid() + "," + selectedSpelprojekt + ")";
                DB.insert(query);
            } catch (InfException e) {
                e.getMessage();
            }
            loadPlattformar(); //reload plattform if we added one
        } else {
            lblError.setText(selPlat.getBenamning() + " är redan tillagd.");
            lblError.setVisible(true);
        }
    }