public void setViewerFrame(JFrame v) {
        viewer = v;
        viewer.addWindowListener(this);
        // add drag and drop listeners
        new DropTarget(viewer, // component
                DnDConstants.ACTION_COPY_OR_MOVE, // actions
                this); // DropTargetListener
        reflectStateInComponents();
    }