JAL-1807 - Bob's last(?) before leaving Dundee -- adds fast file loading
[jalviewjs.git] / site / j2s / jalview / appletgui / TitledPanel.js
index 026a455..480b54d 100644 (file)
@@ -1,5 +1,5 @@
 Clazz.declarePackage ("jalview.appletgui");
-Clazz.load (["awt2swing.Panel", "java.awt.Insets"], "jalview.appletgui.TitledPanel", null, function () {
+Clazz.load (["awt2swing.Panel", "java.awt.Insets"], "jalview.appletgui.TitledPanel", ["awt2swing.Util"], function () {
 c$ = Clazz.decorateAsClass (function () {
 this.title = null;
 this.$insets = null;
@@ -30,7 +30,7 @@ var width = g.getFontMetrics ().stringWidth (this.getTitle ());
 g.setColor (this.getBackground ());
 g.fillRect (10, 0, width, 10);
 g.setColor (this.getForeground ());
-g.drawString (this.getTitle (), 10, 10);
+awt2swing.Util.drawString (g, this.getTitle (), 10, 10);
 }, "java.awt.Graphics");
 Clazz.defineMethod (c$, "getTitle", 
 function () {