* @param textSpecs a <code>TextSpecification</code> array
     * @param backgroundColor a <code>Color</code> value
     * @return an <code>Image</code> value
     */
    private Image createLabel(Graphics2D g, TextSpecification[] textSpecs, Color backgroundColor) {
        int hPadding = 15;
        int vPadding = 10;
        int linePadding = 2;
        int width = 0;
        int height = vPadding;
        int i;

        TextSpecification spec;
        TextLayout[] labels = new TextLayout[textSpecs.length];
        TextLayout label;

        for (i = 0; i < textSpecs.length; i++) {
            spec = textSpecs[i];
            label = new TextLayout(spec.text, spec.font, g.getFontRenderContext());
            labels[i] = label;
            width = Math.max(width, (int) label.getBounds().getWidth() + hPadding);
            height += (int) (label.getAscent() + label.getDescent());
            if (i > 0) height += linePadding;
        }

        int radius = Math.min(hPadding, vPadding);

        BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g2 = bi.createGraphics();
        g2.scale(lib.getScalingFactor(), lib.getScalingFactor());
        g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);

        g2.setColor(backgroundColor);
        g2.fill(new RoundRectangle2D.Float(0, 0, width, height, radius, radius));
        g2.setColor(getForegroundColor(backgroundColor));
        int offset = 0;
        for (i = 0; i < labels.length; i++) {
            if (i > 0) offset += labels[i - 1].getAscent() + linePadding + vPadding/2;
            labels[i].draw(g2, (float) (width - labels[i].getBounds().getWidth())/2,
                           offset + labels[i].getAscent() + vPadding/2);
        }
        return bi;
    }