Source code: comiccollection/ComicCollection.java
1 package comiccollection;
2
3 /**
4 * This class contains the main function, and starts the program
5 */
6 public class ComicCollection{
7
8 public static void main(String[] args){
9 String confFile;
10
11 // Make sure we have the config file
12 if((args==null)||(args.length<1)){
13 // System.out.println("You must enter the address of the program configuration file!");
14 // System.exit(0);
15 confFile=System.getProperty("user.home")+"/"+".comiccollection";
16 System.out.println("Assuming config at "+confFile);
17 }else{
18 confFile=args[0];
19 }
20
21 // Create the object that will manage the comic collection
22 CollectionManager cm=new CollectionManager(confFile);
23 cm.init();
24
25 // Create the UI, passing the CollectionManager to it
26 ComicWindow cw=new ComicWindow(cm);
27 cw.init();
28 cw.setSize(750, 400);
29 cw.setVisible(true);
30 }
31 }