@Override
        public void mouseClicked(MouseEvent e)
        {

            int x = e.getX();
            int y = e.getY();

            int oldSel = selectedObject;

            for (NSMBObject obj : objects)
            {
                Rectangle or = getRectFor(obj);
                if (or.contains(x, y))
                {
                    selected = obj;
                    selectedObject = obj.ObjNum;
                }
            }

            if (oldSel != selectedObject)
            {
                for (ObjectChangeListener l : listeners)
                    l.objectChanged(selectedObject);
                repaint();
            }
        }