super("Register SunVideo Caputure Devices");
setLayout(new FlowLayout());
int nDevices = 0;
for (int i = 0; i < 7; i++) {
File fl = new File(DEVICE_PREFIX + i);
if (fl.exists()) {
Button device = new Button(DEVICE_PREFIX + i);
add(device);
device.addActionListener( new DBListener(i) );
nDevices++;
}
}
devices = new CaptureDeviceInfo[nDevices];
pack();
addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent we) {
if (currentID != -1) {
System.err.println("Need to close other window first");
return;
}
dispose();
System.exit(0);
}
} );