loadFileMenu(fileMenu);
menuBar.add(fileMenu);
//Cam Menu
try{
WCVCam cam;
File camsList = new File(CAMLIST_FILE);
camsList.getParentFile().mkdirs();
camsList.createNewFile();
Scanner scan = new Scanner(camsList);
int i = 0; String camURL;
JMenuItem item;
while(scan.hasNextLine()) {
item = new JMenuItem();
item.setOpaque(true);
String camTitle[] = scan.nextLine().split(", ");
if(camTitle[0].contains("****")) {
//"****" Marks the most recently viewed cam
camTitle[0] = camTitle[0].substring(5);
camNum = i;
}
camURL = scan.nextLine();
if(camTitle.length == 1 || camTitle[1] == "") {
cam = new WCVCam(camTitle[0], "", camURL);
cam.setImageViewerMode(WCVPreferences.getViewerMode());
cams.add(cam);
item.setText(camTitle[0]);
}
else {
cam = new WCVCam(camTitle[0], camTitle[1], camURL);
cam.setImageViewerMode(WCVPreferences.getViewerMode());
cams.add(cam);
item.setText(camTitle[0] + ", " + camTitle[1]);
}
item.setFont(itemFont);
item.addActionListener(new CamSwitchListener(i));