From: amwaterhouse Date: Mon, 31 Oct 2005 15:54:00 +0000 (+0000) Subject: Use fontmetrics to tidy up display X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c0fb62be71db24630c0c4d2aef1936202ca09d3e;p=jalview.git Use fontmetrics to tidy up display --- 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")) {