don't use setdefaultlookandfeeldecorated, its buggy
[jalview.git] / src / jalview / bin / Jalview.java
1 /********************\r
2  * 2004 Jalview Reengineered\r
3  * Barton Group\r
4  * Dundee University\r
5  *\r
6  * AM Waterhouse\r
7  *******************/\r
8 \r
9 \r
10 package jalview.bin;\r
11 \r
12 import jalview.gui.*;\r
13 import javax.swing.*;\r
14 \r
15 public class Jalview\r
16 {\r
17 \r
18    public static void main(String[] args) {\r
19      try{\r
20        UIManager.setLookAndFeel //("javax.swing.plaf.metal.MetalLookAndFeel");\r
21            ( UIManager.getCrossPlatformLookAndFeelClassName() );\r
22 \r
23        //   ("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");\r
24       // ("com.sun.java.swing.plaf.motif.MotifLookAndFeel" );\r
25      }\r
26      catch (Exception ex)\r
27      {}\r
28 \r
29     // JFrame.setDefaultLookAndFeelDecorated(true);\r
30      Desktop frame = new Desktop();\r
31      frame.setResizable(true);\r
32      frame.setVisible(true);\r
33 \r
34 \r
35      if(args!=null && args.length>0)\r
36      {\r
37          String file = args[0];\r
38          jalview.bin.Cache.LAST_DIRECTORY = file;\r
39          String protocol = "File";\r
40          if(file.indexOf("http:")>-1)\r
41            protocol = "URL";\r
42 \r
43          String format = jalview.io.IdentifyFile.Identify(file, protocol);\r
44 \r
45          frame.LoadFile(file, protocol, format);\r
46      }\r
47 \r
48    }\r
49 \r
50 }\r