From 2bc1c411b0aaec627f60aeaecf5eeaa6233551cc Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 2 Feb 2007 11:38:58 +0000 Subject: [PATCH] LookandFeel must be set in headless state as window sizes will be affected --- src/jalview/bin/Jalview.java | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 1116fe4..30f91ac 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -100,29 +100,30 @@ public class Jalview } Desktop desktop = null; - if( !headless ) + + + try { - try - { - UIManager.setLookAndFeel( - UIManager.getSystemLookAndFeelClassName() - // UIManager.getCrossPlatformLookAndFeelClassName() -//"com.sun.java.swing.plaf.gtk.GTKLookAndFeel" -//"javax.swing.plaf.metal.MetalLookAndFeel" -//"com.sun.java.swing.plaf.windows.WindowsLookAndFeel" -//"com.sun.java.swing.plaf.motif.MotifLookAndFeel" - - ); - } - catch (Exception ex) + UIManager.setLookAndFeel( + UIManager.getSystemLookAndFeelClassName() + // UIManager.getCrossPlatformLookAndFeelClassName() + //"com.sun.java.swing.plaf.gtk.GTKLookAndFeel" + //"javax.swing.plaf.metal.MetalLookAndFeel" + //"com.sun.java.swing.plaf.windows.WindowsLookAndFeel" + //"com.sun.java.swing.plaf.motif.MotifLookAndFeel" + + ); + } + catch (Exception ex) + {} + + if (!headless) { + desktop = new Desktop(); + desktop.setVisible(true); + desktop.discoverer.start(); } - desktop = new Desktop(); - desktop.setVisible(true); - desktop.discoverer.start(); - } - String file = null, protocol = null, format = null, data=null; jalview.io.FileLoader fileLoader = new jalview.io.FileLoader(); -- 1.7.10.2