java写表格生成图片源代码 (三)

2014-11-24 11:01:08 · 作者: · 浏览: 2
graphics.drawString(cellsValue[n][l].toString(), startWidth+colwidth*l+5, startHeight+rowheight*(n+3)-10);
}
}

font = new Font("华文楷体",Font.BOLD,18);
graphics.setFont(font);
graphics.setColor(Color.RED);

//写备注
String remark = "备注:备注写在这里。";
graphics.drawString(remark, startWidth, imageHeight-30);

createImage("c:\\1.jpg");
}

public static void main(String[] args) {
TestTable cg = new TestTable();
try {
cg.graphicsGeneration();
} catch (Exception e) {
e.printStackTrace();
}
}

}