Changeset 1383


Ignore:
Timestamp:
08/29/06 15:20:34 (14 years ago)
Author:
curtis
Message:

Cannot use Windows look and feel on non-Windows OSes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataNotebook.java

    r1370 r1383  
    6868  protected loci.ome.viewer.MetadataPane mdp; 
    6969   
    70   /**The File>New menu item.*/ 
     70  /**The File>New menu item.*/ 
    7171  protected JMenuItem fileNew; 
    7272   
     
    7474  protected NotePane noteP; 
    7575   
    76   /**The WiscScan emulator that mimics the GUI of the WiscScan 
    77   *  program for ease of use by our in-house biologists. 
    78   */ 
     76  /** 
     77   * The WiscScan emulator that mimics the GUI of the WiscScan 
     78   * program for ease of use by our in-house biologists. 
     79   */ 
    7980  protected WiscScanPane scanP; 
    8081   
     
    9899 
    99100                try { 
    100             UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); 
     101      String os = System.getProperty("os.name"); 
     102      String laf = os != null && os.indexOf("Windows") >= 0 ? 
     103        "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" : 
     104        "javax.swing.plaf.metal.MetalLookAndFeel"; 
     105            UIManager.setLookAndFeel(laf); 
    101106                } 
    102107                catch (Exception exc) { 
    103                   System.out.println("Sorry but we could not find the look and feel jar."); 
     108                  System.err.println("Sorry, but we could not find the look and feel JAR."); 
    104109                } 
    105110                 
Note: See TracChangeset for help on using the changeset viewer.