Menu

messagebox throw exception

2008-02-25
2013-04-24
  • Nobody/Anonymous

    when display unicode message,i got exception say

    Font.getStringWidth() index out of range :

    public int getStringWidth(String s) {
            Metrics fm = getMetrics();
            int[] widths = fm.widths;
            int width = 0;
            for (int i = 0, cnt = s.length(); i < cnt; i++) {
                char c = s.charAt(i);
                int w=0;
                 byte b = (byte)c;
                 w = widths[b - 32];}
                 width += w;
            }
      }

            return width;
        }

     
    • Anonymous

      Anonymous - 2008-02-25

      This was an issue some time for MessageBox too but is fixed in latest subversion 1.2 branche.

       

Log in to post a comment.

MongoDB Logo MongoDB