From: amwaterhouse Date: Tue, 14 Jun 2005 11:32:45 +0000 (+0000) Subject: Set background colour of applet RGB X-Git-Tag: Release_2_0~50 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a5dc530b8530620b5a879f66caf5f7d76f07ee2f;p=jalview.git Set background colour of applet RGB --- diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 35ebecc..2a411f7 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -40,7 +40,22 @@ public class JalviewLite extends Applet { public void init() { applet = this; - this.setBackground(Color.white); + + int r=255,g=255,b=255; + String param = getParameter("RGB"); + if(param!=null) + { + try + { + r = Integer.parseInt(param.substring(0,2),16); + g = Integer.parseInt(param.substring(2,4),16); + b = Integer.parseInt(param.substring(4,6),16); + } + catch (Exception ex) + { r=255;g=255;b=255; } + } + + this.setBackground(new Color(r,g,b)); file = getParameter("file");