public synchronized static Form moveToLastForm(Point p) {
        for (Form form: Forms.forms) {
            if (p.x > form.getStart().x && p.y > form.getStart().y
                    && p.x < form.getEnd().x && p.y < form.getEnd().y) {
                Form temp = new Form(form);
                Forms.forms.remove(form);
                Forms.forms.add(temp);
                return temp;
            }
        }
        return null;
    }