.getCanonicalPath();
} catch (IOException e) {
JOptionPane.showMessageDialog(null,
"Unable to open video");
}
cameraPanel = new BlobPublishingCameraPanel(path);
if (cameraPanel.isProcessing() == false) {
cameraPanel = null;
btnOpenFile.setVisible(true);
btnWebcam.setVisible(true);
btnClose.setVisible(false);
} else {
cameraPanel.setVisible(true);
cameraPanel.switchFeed(0);
getContentPane().add(cameraPanel);
btnOpenFile.setVisible(false);
btnWebcam.setVisible(false);
btnClose.setVisible(true);
}
}
}
});
btnOpenFile.setBounds(0, 0, 89, 23);
controlPanel.add(btnOpenFile);
btnClose.setBounds(89, 0, 89, 23);
controlPanel.add(btnClose);
btnWebcam.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
cameraPanel = new BlobPublishingCameraPanel("webcam");
if (cameraPanel.isProcessing() == false) {
cameraPanel = null;
btnOpenFile.setVisible(true);
btnWebcam.setVisible(true);
btnClose.setVisible(false);