int currentLine = 0;
        private boolean splitMessage(String string, int size) {            Font font = new Font(fontname, fontstyle, size);            FontMetrics metrics = Toolkit.getDefaultToolkit().getFontMetrics(font);            int longestLine = 0;            int heightSoFar = 0;            int heightIncrement = (int) (0.84f * metrics.getHeight());            StringTokenizer tk = new StringTokenizer(string);            StringBuffer buffer = new StringBuffer();            int spaceWidth = metrics.stringWidth(" ");            int currentLine = 0;            int currentWidth = 0;            int maxWidth = w - 2;            int maxHeight = (h + addedSpace) - 2;            while (tk.hasMoreTokens()) {                String nextToken = tk.nextToken();                int nextWidth = metrics.stringWidth(nextToken);                if ((((currentWidth + nextWidth) >= maxWidth) && (currentWidth != 0))) {                    Line line = new Line(buffer.toString(), x, heightSoFar, metrics);                    lines.addElement(line);                    if (line.textwidth > longestLine) {                        longestLine = line.textwidth;                    }                    buffer = new StringBuffer();                    currentWidth = 0;                    heightSoFar += heightIncrement;                }                buffer.append(nextToken);                buffer.append(" ");                currentWidth += (nextWidth + spaceWidth);                if (((1.18 * heightSoFar) > maxHeight) && (fontsize > 10)) {                    return false;                }            }            if (!"".equals(buffer.toString().trim())) {                Line line = new Line(buffer.toString(), x, heightSoFar, metrics);                lines.addElement(line);                if (line.textwidth > longestLine) {                    longestLine = line.textwidth;                }                if ((longestLine > maxWidth) && (fontsize > 10)) {                    return false;                }                heightSoFar += heightIncrement;            }            xLeft = w - longestLine;            yLeft = (addedSpace + h) - heightSoFar;            realHeight = heightSoFar;            return ((1.18 * heightSoFar) <= maxHeight);        }