Use fontmetrics to tidy up display
authoramwaterhouse <Andrew Waterhouse>
Mon, 31 Oct 2005 15:54:00 +0000 (15:54 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 31 Oct 2005 15:54:00 +0000 (15:54 +0000)
src/jalview/gui/SplashScreen.java

index 49730a0..05f412f 100755 (executable)
@@ -128,9 +128,12 @@ public class SplashScreen extends JPanel implements Runnable
         int y = yoffset;\r
 \r
         g.drawString("Jalview "+jalview.bin.Cache.getProperty("VERSION"), 50, y);\r
+\r
+        FontMetrics fm = g.getFontMetrics();\r
+        int vwidth = fm.stringWidth("Jalview "+jalview.bin.Cache.getProperty("VERSION"));\r
         g.setFont(new Font("Verdana", Font.BOLD, fontSize + 2));\r
         g.drawString("Last updated: " + jalview.bin.Cache.getDefault("BUILD_DATE", "unknown"),\r
-                     180, y);\r
+                     50 + vwidth +5, y);\r
 \r
         if (jalview.bin.Cache.getDefault("LATEST_VERSION", "Checking").equals("Checking"))\r
         {\r