From a5dc530b8530620b5a879f66caf5f7d76f07ee2f Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 14 Jun 2005 11:32:45 +0000 Subject: [PATCH] Set background colour of applet RGB --- src/jalview/bin/JalviewLite.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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"); -- 1.7.10.2