Revision: 4890
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4890&view=rev
Author:   bphinz
Date:     2012-04-13 01:36:45 +0000 (Fri, 13 Apr 2012)
Log Message:
-----------
Make the Swing LookAndFeel consistent between applet mode and standalone mode.

Modified Paths:
--------------
    trunk/java/com/tigervnc/vncviewer/VncViewer.java

Modified: trunk/java/com/tigervnc/vncviewer/VncViewer.java
===================================================================
--- trunk/java/com/tigervnc/vncviewer/VncViewer.java    2012-04-13 01:22:08 UTC 
(rev 4889)
+++ trunk/java/com/tigervnc/vncviewer/VncViewer.java    2012-04-13 01:36:45 UTC 
(rev 4890)
@@ -61,7 +61,7 @@
   public static String version = null;
   public static String build = null;
 
-  public static void main(String[] argv) {
+  public static void setLookAndFeel() {
     try {
       String os = System.getProperty("os.name");
       if (os.startsWith("Windows")) {
@@ -80,7 +80,13 @@
         }
       }
       UIManager.put("TitledBorder.titleColor",Color.blue);
-    } catch (java.lang.Exception exc) { }
+    } catch (java.lang.Exception e) { 
+      vlog.info(e.toString());
+    }
+  }
+
+  public static void main(String[] argv) {
+    setLookAndFeel();
     VncViewer viewer = new VncViewer(argv);
     viewer.firstApplet = true;
     viewer.stop = false;
@@ -232,6 +238,7 @@
 
   public void init() {
     vlog.debug("init called");
+    setLookAndFeel();
     setBackground(Color.white);
     ClassLoader cl = this.getClass().getClassLoader();
     ImageIcon icon = new 
ImageIcon(cl.getResource("com/tigervnc/vncviewer/tigervnc.png"));

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to