Program: 70661
Project: 70661
Buggy source:
/** 
 * Create a dialog box to set the movie making options.
 */
public MovieMakerDialog(MovieMaker movieMaker,Main main){
  super();
  myMain=main;
  myFrame=myMain.getMainFrame();
  myMovieMaker=movieMaker;
  JPanel contentPane=new JPanel();
  contentPane.setLayout(new BorderLayout());
  setContentPane(contentPane);
  setTitle("String_Node_Str");
  JTabbedPane tabbedPane=new JTabbedPane();
  Box recOptionsBox=Box.createVerticalBox();
  LabeledComponentPanel captureOptions=new LabeledComponentPanel();
  captureOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  LabeledComponentPanel recOptions=new LabeledComponentPanel();
  recOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  windowButtons=new OptionPanel("String_Node_Str",this);
  viewWindowButton=windowButtons.getButton("String_Node_Str");
  viewWindowButton.setActionCommand(VIEW_WINDOW_CMD);
  viewWindowButton.setToolTipText("String_Node_Str");
  GuiUtils.setFixedSize(viewWindowButton,viewWindowButton.getPreferredSize());
  viewWindowButton.setBorder(new BevelBorder(BevelBorder.LOWERED));
  fullWindowButton=windowButtons.getButton("String_Node_Str");
  fullWindowButton.setToolTipText("String_Node_Str");
  fullWindowButton.setActionCommand(FULL_WINDOW_CMD);
  GuiUtils.setFixedSize(fullWindowButton,fullWindowButton.getPreferredSize());
  fullWindowButton.setBorder(new BevelBorder(BevelBorder.RAISED));
  customWindowButton=windowButtons.getButton("String_Node_Str");
  customWindowButton.setToolTipText("String_Node_Str");
  customWindowButton.setActionCommand(CUSTOM_WINDOW_CMD);
  GuiUtils.setFixedSize(customWindowButton,customWindowButton.getPreferredSize());
  customWindowButton.setBorder(new BevelBorder(BevelBorder.RAISED));
  captureOptions.addWidget(windowButtons);
  windowXPosition=new IntegerField("String_Node_Str",0);
  windowXPosition.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowXPosition);
  windowYPosition=new IntegerField("String_Node_Str",0);
  windowYPosition.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowYPosition);
  windowWidth=new IntegerField("String_Node_Str",0);
  windowWidth.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowWidth);
  windowHeight=new IntegerField("String_Node_Str",0);
  windowHeight.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowHeight);
  recOptionsBox.add(captureOptions);
  beginRecordOnStart=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(beginRecordOnStart);
  endRecordOnStop=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(endRecordOnStop);
  automaticFrames=new JCheckBox("String_Node_Str",null,true);
  automaticFrames.addChangeListener(new ChangeListener(){
    @Override public void stateChanged(    ChangeEvent e){
      JCheckBox box=(JCheckBox)e.getSource();
      if (isStarted()) {
        if (box.isSelected()) {
          myMovieMaker.setGrabbing(true);
        }
 else {
          myMovieMaker.setGrabbing(false);
        }
      }
    }
  }
);
  recOptions.addWidget(automaticFrames);
  removeImages=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(removeImages);
  saveMovieImage=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(saveMovieImage);
  showCaptureFrame=new JCheckBox("String_Node_Str",null,true);
  showCaptureFrame.addActionListener(this);
  showCaptureFrame.setEnabled(false);
  recOptions.addWidget(showCaptureFrame);
  alwaysOnTop=new JCheckBox("String_Node_Str",null,myMovieMaker.isAlwaysOnTop());
  recOptions.add(alwaysOnTop);
  alwaysOnTop.addActionListener(this);
  recordAudio=new JCheckBox(REC_AUDIO_CMD,null,false);
  recordAudio.addActionListener(this);
  normalizeAudio=new JCheckBox("String_Node_Str",null,false);
  recordAudioTxt=new JCheckBox(REC_AUDIO_TO_TXT_CMD,null,false);
  recordAudioTxt.addActionListener(this);
  setAudioOptions(myMain.getRootModel() instanceof HasAudio);
  recOptionsBox.add(recOptions);
  filename=new StringField("String_Node_Str","String_Node_Str",10);
  filename.setStretchable(true);
  filename.setBorder(BorderFactory.createEmptyBorder(5,0,5,0));
  recOptionsBox.add(filename);
  Box encOptionsBox=Box.createVerticalBox();
  LabeledComponentPanel outputOptions=new LabeledComponentPanel();
  outputOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  LabeledComponentPanel sizeOptions=new LabeledComponentPanel();
  sizeOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  frameRateField=new DoubleField("String_Node_Str",myMovieMaker.getFrameRate());
  frameRateField.addValueChangeListener(this);
  frameRateField.setRange(1,Integer.MAX_VALUE);
  outputOptions.addWidget(frameRateField);
  speedField=new DoubleField("String_Node_Str",myMovieMaker.getSpeed());
  speedField.addValueChangeListener(this);
  speedField.setRange(1e-6,Double.POSITIVE_INFINITY);
  outputOptions.addWidget(speedField);
  formatSelector=new StringSelector("String_Node_Str",ImageIO.getWriterFormatNames());
  String imageFmt=movieMaker.getFormat();
  if (imageFmt == null) {
    formatSelector.setValue("String_Node_Str");
  }
 else {
    formatSelector.setValue(imageFmt);
  }
  formatSelector.addValueChangeListener(this);
  GuiUtils.setFixedSize(formatSelector.getComboBox(),new Dimension(125,25));
  outputOptions.addWidget(formatSelector);
  HashMap<String,MovieMaker.Method> methodMap=movieMaker.getMethodMap();
  methodSelector=new StringSelector("String_Node_Str",methodMap.keySet().toArray(new String[0]));
  String currentMethod=movieMaker.getMethod();
  if (currentMethod == null) {
    methodSelector.setValue(MovieMaker.INTERNAL_METHOD);
  }
 else {
    methodSelector.setValue(currentMethod);
  }
  methodSelector.addValueChangeListener(this);
  GuiUtils.setFixedSize(methodSelector.getComboBox(),new Dimension(125,25));
  customizeButton=new JButton("String_Node_Str");
  customizeButton.setActionCommand(CUSTOMIZE_CMD);
  customizeButton.addActionListener(this);
  customizeButton.setMargin(new Insets(3,3,3,3));
  GuiUtils.setFixedSize(customizeButton,new Dimension(125,25));
  outputOptions.addWidget(methodSelector);
  outputOptions.addWidget(customizeButton);
  encOptionsBox.add(outputOptions);
  originalSize=new JCheckBox("String_Node_Str",true);
  originalSize.addActionListener(this);
  sizeOptions.addWidget(originalSize);
  constrainSize=new JCheckBox("String_Node_Str",true);
  constrainSize.addActionListener(this);
  constrainSize.setEnabled(false);
  sizeOptions.addWidget(constrainSize);
  resizeWidth=new IntegerField("String_Node_Str",0);
  resizeWidth.getTextField().setEnabled(false);
  resizeWidth.addValueChangeListener(new ValueChangeListener(){
    public void valueChange(    ValueChangeEvent e){
      if (constrainSize.isSelected()) {
        double scale=resizeWidth.getDoubleValue() / windowWidth.getDoubleValue();
        resizeHeight.setValue(scale * windowHeight.getIntValue());
      }
      myMovieMaker.setCaptureArea(myMovieMaker.getCaptureArea(),new Dimension((Integer)resizeWidth.getIntValue(),(Integer)resizeHeight.getIntValue()),viewerCapture);
    }
  }
);
  sizeOptions.addWidget(resizeWidth);
  resizeHeight=new IntegerField("String_Node_Str",0);
  resizeHeight.getTextField().setEnabled(false);
  resizeHeight.addValueChangeListener(new ValueChangeListener(){
    public void valueChange(    ValueChangeEvent e){
      if (constrainSize.isSelected()) {
        double scale=resizeHeight.getDoubleValue() / windowHeight.getDoubleValue();
        resizeWidth.setValue(scale * windowWidth.getIntValue());
      }
      myMovieMaker.setCaptureArea(myMovieMaker.getCaptureArea(),new Dimension((Integer)resizeWidth.getIntValue(),(Integer)resizeHeight.getIntValue()),viewerCapture);
    }
  }
);
  sizeOptions.addWidget(resizeHeight);
  int nDefaultSamples=FrameBufferObject.defaultMultiSamples;
  resizeSamples=new IntegerField("String_Node_Str",nDefaultSamples);
  resizeSamples.setToolTipText("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  resizeSamples.getTextField().setEnabled(false);
  resizeSamples.setRange(new IntegerInterval(1,16));
  resizeSamples.addValueChangeListener(this);
  sizeOptions.addWidget(resizeSamples);
  encOptionsBox.add(sizeOptions);
  Box extraBox=Box.createVerticalBox();
  LabeledComponentPanel extraCommands=new LabeledComponentPanel();
  extraCommands.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  extraCommands.setName("String_Node_Str");
  JButton waypointButton=new JButton("String_Node_Str");
  waypointButton.setActionCommand(WAYPOINT_CMD);
  waypointButton.addActionListener(this);
  extraCommands.addWidget(waypointButton);
  extraBox.add(extraCommands);
  tabbedPane.addTab("String_Node_Str",recOptionsBox);
  tabbedPane.addTab("String_Node_Str",encOptionsBox);
  tabbedPane.addTab("String_Node_Str",extraBox);
  if (myMain.getModelName() != null) {
    setMovieName(myMain.getModelName());
  }
  add(tabbedPane,BorderLayout.NORTH);
  updateMethodSelectors();
  controlPanel=new OptionPanel("String_Node_Str" + START_CMD + "String_Node_Str"+ FRAME_CMD+ "String_Node_Str"+ STOP_CMD+ "String_Node_Str"+ CLOSE_CMD,this);
  startButton=controlPanel.getButton(START_CMD);
  stopButton=controlPanel.getButton(STOP_CMD);
  stopButton.setEnabled(false);
  frameButton=controlPanel.getButton(FRAME_CMD);
  frameButton.setEnabled(false);
  add(controlPanel,BorderLayout.CENTER);
  viewerCapture=true;
  customCapture=false;
  final Component displayComponent=myFrame.getViewer().getCanvas().getComponent();
  setCaptureArea(displayComponent);
  displayComponent.addComponentListener(new ComponentListener(){
    public void componentHidden(    ComponentEvent c_evt){
    }
    public void componentMoved(    ComponentEvent c_evt){
      if (!customCapture && viewerCapture) {
        setCaptureArea(displayComponent);
      }
 else       if (!customCapture && !viewerCapture) {
        setCaptureArea(myFrame);
      }
    }
    public void componentResized(    ComponentEvent c_evt){
      if (!customCapture && viewerCapture) {
        setCaptureArea(displayComponent);
      }
 else       if (!customCapture && !viewerCapture) {
        setCaptureArea(myFrame);
      }
    }
    public void componentShown(    ComponentEvent c_evt){
    }
  }
);
  pack();
  setMinimumSize(getPreferredSize());
}

Fixed version (ground truth):
/** 
 * Create a dialog box to set the movie making options.
 */
public MovieMakerDialog(MovieMaker movieMaker,Main main){
  super();
  myMain=main;
  myFrame=myMain.getMainFrame();
  myMovieMaker=movieMaker;
  JPanel contentPane=new JPanel();
  contentPane.setLayout(new BorderLayout());
  setContentPane(contentPane);
  setTitle("String_Node_Str");
  JTabbedPane tabbedPane=new JTabbedPane();
  Box recOptionsBox=Box.createVerticalBox();
  LabeledComponentPanel captureOptions=new LabeledComponentPanel();
  captureOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  LabeledComponentPanel recOptions=new LabeledComponentPanel();
  recOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  windowButtons=new OptionPanel("String_Node_Str",this);
  viewWindowButton=windowButtons.getButton("String_Node_Str");
  viewWindowButton.setActionCommand(VIEW_WINDOW_CMD);
  viewWindowButton.setToolTipText("String_Node_Str");
  GuiUtils.setFixedSize(viewWindowButton,viewWindowButton.getPreferredSize());
  viewWindowButton.setBorder(new BevelBorder(BevelBorder.LOWERED));
  fullWindowButton=windowButtons.getButton("String_Node_Str");
  fullWindowButton.setToolTipText("String_Node_Str");
  fullWindowButton.setActionCommand(FULL_WINDOW_CMD);
  GuiUtils.setFixedSize(fullWindowButton,fullWindowButton.getPreferredSize());
  fullWindowButton.setBorder(new BevelBorder(BevelBorder.RAISED));
  customWindowButton=windowButtons.getButton("String_Node_Str");
  customWindowButton.setToolTipText("String_Node_Str");
  customWindowButton.setActionCommand(CUSTOM_WINDOW_CMD);
  GuiUtils.setFixedSize(customWindowButton,customWindowButton.getPreferredSize());
  customWindowButton.setBorder(new BevelBorder(BevelBorder.RAISED));
  captureOptions.addWidget(windowButtons);
  windowXPosition=new IntegerField("String_Node_Str",0);
  windowXPosition.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowXPosition);
  windowYPosition=new IntegerField("String_Node_Str",0);
  windowYPosition.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowYPosition);
  windowWidth=new IntegerField("String_Node_Str",0);
  windowWidth.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowWidth);
  windowHeight=new IntegerField("String_Node_Str",0);
  windowHeight.addValueChangeListener(new AreaHandler());
  captureOptions.addWidget(windowHeight);
  recOptionsBox.add(captureOptions);
  beginRecordOnStart=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(beginRecordOnStart);
  endRecordOnStop=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(endRecordOnStop);
  automaticFrames=new JCheckBox("String_Node_Str",null,true);
  automaticFrames.addChangeListener(new ChangeListener(){
    @Override public void stateChanged(    ChangeEvent e){
      JCheckBox box=(JCheckBox)e.getSource();
      if (isStarted()) {
        if (box.isSelected()) {
          myMovieMaker.setGrabbing(true);
        }
 else {
          myMovieMaker.setGrabbing(false);
        }
      }
    }
  }
);
  recOptions.addWidget(automaticFrames);
  removeImages=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(removeImages);
  saveMovieImage=new JCheckBox("String_Node_Str",null,true);
  recOptions.addWidget(saveMovieImage);
  showCaptureFrame=new JCheckBox("String_Node_Str",null,true);
  showCaptureFrame.addActionListener(this);
  showCaptureFrame.setEnabled(false);
  recOptions.addWidget(showCaptureFrame);
  alwaysOnTop=new JCheckBox("String_Node_Str",null,myMovieMaker.isAlwaysOnTop());
  recOptions.add(alwaysOnTop);
  alwaysOnTop.addActionListener(this);
  recordAudio=new JCheckBox(REC_AUDIO_CMD,null,false);
  recordAudio.addActionListener(this);
  normalizeAudio=new JCheckBox("String_Node_Str",null,false);
  recordAudioTxt=new JCheckBox(REC_AUDIO_TO_TXT_CMD,null,false);
  recordAudioTxt.addActionListener(this);
  setAudioOptions(myMain.getRootModel() instanceof HasAudio);
  recOptionsBox.add(recOptions);
  filename=new StringField("String_Node_Str","String_Node_Str",10);
  filename.setStretchable(true);
  filename.setBorder(BorderFactory.createEmptyBorder(5,0,5,0));
  recOptionsBox.add(filename);
  Box encOptionsBox=Box.createVerticalBox();
  LabeledComponentPanel outputOptions=new LabeledComponentPanel();
  outputOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  LabeledComponentPanel sizeOptions=new LabeledComponentPanel();
  sizeOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  frameRateField=new DoubleField("String_Node_Str",myMovieMaker.getFrameRate());
  frameRateField.addValueChangeListener(this);
  frameRateField.setRange(1,Integer.MAX_VALUE);
  outputOptions.addWidget(frameRateField);
  speedField=new DoubleField("String_Node_Str",myMovieMaker.getSpeed());
  speedField.addValueChangeListener(this);
  speedField.setRange(1e-6,Double.POSITIVE_INFINITY);
  outputOptions.addWidget(speedField);
  formatSelector=new StringSelector("String_Node_Str",ImageIO.getWriterFormatNames());
  String imageFmt=movieMaker.getFormat();
  if (imageFmt == null) {
    formatSelector.setValue("String_Node_Str");
  }
 else {
    formatSelector.setValue(imageFmt);
  }
  formatSelector.addValueChangeListener(this);
  GuiUtils.setFixedSize(formatSelector.getComboBox(),new Dimension(125,25));
  outputOptions.addWidget(formatSelector);
  HashMap<String,MovieMaker.Method> methodMap=movieMaker.getMethodMap();
  methodSelector=new StringSelector("String_Node_Str",methodMap.keySet().toArray(new String[0]));
  String currentMethod=movieMaker.getMethod();
  if (currentMethod == null) {
    methodSelector.setValue(MovieMaker.INTERNAL_METHOD);
  }
 else {
    methodSelector.setValue(currentMethod);
  }
  methodSelector.addValueChangeListener(this);
  GuiUtils.setFixedSize(methodSelector.getComboBox(),new Dimension(125,25));
  customizeButton=new JButton("String_Node_Str");
  customizeButton.setActionCommand(CUSTOMIZE_CMD);
  customizeButton.addActionListener(this);
  customizeButton.setMargin(new Insets(3,3,3,3));
  GuiUtils.setFixedSize(customizeButton,new Dimension(125,25));
  outputOptions.addWidget(methodSelector);
  outputOptions.addWidget(customizeButton);
  encOptionsBox.add(outputOptions);
  originalSize=new JCheckBox("String_Node_Str",true);
  originalSize.addActionListener(this);
  sizeOptions.addWidget(originalSize);
  constrainSize=new JCheckBox("String_Node_Str",true);
  constrainSize.addActionListener(this);
  constrainSize.setEnabled(false);
  sizeOptions.addWidget(constrainSize);
  resizeWidth=new IntegerField("String_Node_Str",0);
  resizeWidth.getTextField().setEnabled(false);
  resizeWidth.addValueChangeListener(new ValueChangeListener(){
    public void valueChange(    ValueChangeEvent e){
      if (constrainSize.isSelected()) {
        double scale=resizeWidth.getDoubleValue() / windowWidth.getDoubleValue();
        resizeHeight.setValue(scale * windowHeight.getIntValue());
      }
      myMovieMaker.setCaptureArea(myMovieMaker.getCaptureArea(),new Dimension((Integer)resizeWidth.getIntValue(),(Integer)resizeHeight.getIntValue()),viewerCapture);
    }
  }
);
  sizeOptions.addWidget(resizeWidth);
  resizeHeight=new IntegerField("String_Node_Str",0);
  resizeHeight.getTextField().setEnabled(false);
  resizeHeight.addValueChangeListener(new ValueChangeListener(){
    public void valueChange(    ValueChangeEvent e){
      if (constrainSize.isSelected()) {
        double scale=resizeHeight.getDoubleValue() / windowHeight.getDoubleValue();
        resizeWidth.setValue(scale * windowWidth.getIntValue());
      }
      myMovieMaker.setCaptureArea(myMovieMaker.getCaptureArea(),new Dimension((Integer)resizeWidth.getIntValue(),(Integer)resizeHeight.getIntValue()),viewerCapture);
    }
  }
);
  sizeOptions.addWidget(resizeHeight);
  int nDefaultSamples=FrameBufferObject.defaultMultiSamples;
  resizeSamples=new IntegerField("String_Node_Str",nDefaultSamples);
  resizeSamples.setToolTipText("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  resizeSamples.getTextField().setEnabled(false);
  resizeSamples.setRange(new IntegerInterval(1,16));
  resizeSamples.addValueChangeListener(this);
  sizeOptions.addWidget(resizeSamples);
  encOptionsBox.add(sizeOptions);
  Box extraBox=Box.createVerticalBox();
  LabeledComponentPanel advancedOptions=new LabeledComponentPanel();
  advancedOptions.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  advancedOptions.setName("String_Node_Str");
  workingDirField=new FileNameField("String_Node_Str",ArtisynthPath.getTempDir().getAbsolutePath(),10);
  workingDirField.getFileChooser().setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  workingDirField.getFileChooser().setCurrentDirectory(ArtisynthPath.getTempDir());
  advancedOptions.add(workingDirField);
  extraBox.add(advancedOptions);
  LabeledComponentPanel extraCommands=new LabeledComponentPanel();
  extraCommands.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),"String_Node_Str"));
  extraCommands.setName("String_Node_Str");
  JButton waypointButton=new JButton("String_Node_Str");
  waypointButton.setActionCommand(WAYPOINT_CMD);
  waypointButton.addActionListener(this);
  extraCommands.addWidget(waypointButton);
  extraBox.add(extraCommands);
  tabbedPane.addTab("String_Node_Str",recOptionsBox);
  tabbedPane.addTab("String_Node_Str",encOptionsBox);
  tabbedPane.addTab("String_Node_Str",extraBox);
  if (myMain.getModelName() != null) {
    setMovieName(myMain.getModelName());
  }
  add(tabbedPane,BorderLayout.NORTH);
  updateMethodSelectors();
  controlPanel=new OptionPanel("String_Node_Str" + START_CMD + "String_Node_Str"+ FRAME_CMD+ "String_Node_Str"+ STOP_CMD+ "String_Node_Str"+ CLOSE_CMD,this);
  startButton=controlPanel.getButton(START_CMD);
  stopButton=controlPanel.getButton(STOP_CMD);
  stopButton.setEnabled(false);
  frameButton=controlPanel.getButton(FRAME_CMD);
  frameButton.setEnabled(false);
  add(controlPanel,BorderLayout.CENTER);
  viewerCapture=true;
  customCapture=false;
  final Component displayComponent=myFrame.getViewer().getCanvas().getComponent();
  setCaptureArea(displayComponent);
  displayComponent.addComponentListener(new ComponentListener(){
    public void componentHidden(    ComponentEvent c_evt){
    }
    public void componentMoved(    ComponentEvent c_evt){
      if (!customCapture && viewerCapture) {
        setCaptureArea(displayComponent);
      }
 else       if (!customCapture && !viewerCapture) {
        setCaptureArea(myFrame);
      }
    }
    public void componentResized(    ComponentEvent c_evt){
      if (!customCapture && viewerCapture) {
        setCaptureArea(displayComponent);
      }
 else       if (!customCapture && !viewerCapture) {
        setCaptureArea(myFrame);
      }
    }
    public void componentShown(    ComponentEvent c_evt){
    }
  }
);
  pack();
  setMinimumSize(getPreferredSize());
}