void doWork() throws FileNotFoundException { if(printResults != null) { resultsFile = new PrintStream(printResults); } // Start a video processor selector = new RectangleSelectionListener(this); disp = VideoDisplay.createVideoDisplay(source); disp.addVideoListener(new TLDVideoListener(this)); JFrame rootScreen = (JFrame) SwingUtilities.windowForComponent(disp.getScreen()); rootScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); rootScreen.addKeyListener(new TLDKeyListener(this)); disp.getScreen().addMouseListener(selector); disp.getScreen().addMouseMotionListener(selector); } public void initiateObjectSelect() {
this.addMouseMotionListener(this);