From c0fb62be71db24630c0c4d2aef1936202ca09d3e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 31 Oct 2005 15:54:00 +0000 Subject: [PATCH] Use fontmetrics to tidy up display --- src/jalview/gui/SplashScreen.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index 49730a0..05f412f 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -128,9 +128,12 @@ public class SplashScreen extends JPanel implements Runnable int y = yoffset; g.drawString("Jalview "+jalview.bin.Cache.getProperty("VERSION"), 50, y); + + FontMetrics fm = g.getFontMetrics(); + int vwidth = fm.stringWidth("Jalview "+jalview.bin.Cache.getProperty("VERSION")); g.setFont(new Font("Verdana", Font.BOLD, fontSize + 2)); g.drawString("Last updated: " + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"), - 180, y); + 50 + vwidth +5, y); if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking").equals("Checking")) { -- 1.7.10.2