private void deleteItems() {
        ArrayList<Integer> del = new ArrayList<Integer>();

        for(PFile f : Data.getFiles())
            if (f.toEdit) del.add(f.number);

        Object[] options = { bundle.getString("button-delete"), bundle.getString("button-cancel")};
        int n = JOptionPane.showOptionDialog(new Component() {
          static final long serialVersionUID = -6689060806100517959L;
        }, bundle.getString("file-delete-confirm"), bundle.getString("file-delete"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
        if(n==0) {
            for (Iterator<PFile> it = Data.getFiles().iterator(); it.hasNext();) {
                PFile f = it.next();
                if(f.toEdit) {
                    f.selectToEdit(false);
                    f.selectToUpload(false);
                    f.setVisible(false);
                    it.remove();
                }
            }

            Data.updateFileCounter();
            for(int i=0;i<Data.getFiles().size();++i)
                Data.getFiles().get(i).number = i;
        }
    }