summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2012-04-13 01:36:45 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2012-04-13 01:36:45 +0000
commit9580634afdca440942409e942633c54b8d780f36 (patch)
treed87d6df8ceb808b73d09933b360c4f6aa747153b /java
parentf0e2ee7e932871c9afeb3e5010158c7cc8fd3495 (diff)
downloadtigervnc-9580634afdca440942409e942633c54b8d780f36.tar.gz
tigervnc-9580634afdca440942409e942633c54b8d780f36.zip
Make the Swing LookAndFeel consistent between applet mode and standalone mode.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4890 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java')
-rw-r--r--java/com/tigervnc/vncviewer/VncViewer.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/java/com/tigervnc/vncviewer/VncViewer.java b/java/com/tigervnc/vncviewer/VncViewer.java
index f3896b32..850f5f1f 100644
--- a/java/com/tigervnc/vncviewer/VncViewer.java
+++ b/java/com/tigervnc/vncviewer/VncViewer.java
@@ -61,7 +61,7 @@ public class VncViewer extends java.applet.Applet implements Runnable
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 @@ public class VncViewer extends java.applet.Applet implements Runnable
}
}
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 class VncViewer extends java.applet.Applet implements Runnable
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"));