#35 try to emit raw CJK
[fanfix.git] / src / jexer / TLabel.java
index 75623ffc11ad8ecee95e062d4d0b506a4f63afca..1d65976bba16f3947a3c47498cf552dcdda4f849 100644 (file)
@@ -30,6 +30,7 @@ package jexer;
 
 import jexer.bits.CellAttributes;
 import jexer.bits.MnemonicString;
+import jexer.bits.StringUtils;
 
 /**
  * TLabel implements a simple label, with an optional mnemonic hotkey action
@@ -157,7 +158,7 @@ public class TLabel extends TWidget {
         final TAction action) {
 
         // Set parent and window
-        super(parent, false, x, y, text.length(), 1);
+        super(parent, false, x, y, StringUtils.width(text), 1);
 
         mnemonic = new MnemonicString(text);
         this.colorKey = colorKey;
@@ -225,7 +226,7 @@ public class TLabel extends TWidget {
     /**
      * Get the label color.
      *
-     * @param return the ColorTheme key color to use for foreground text
+     * @return the ColorTheme key color to use for foreground text
      */
     public String getColorKey() {
         return colorKey;