廷哥带你小路超车的博客 } Here is a complete example to give you the idea: import java.awt.*; public class TestComponent extends JPanel { private void drawString(Graphics g, String text, int x, int y) { for (String line : ...
春容的博客graphics.setColor(Color.BLACK);Font font = new Font("宋体...graphics.drawString(item.text, item.x, item.y);解决办法1. 拷贝中文字体到JRE目录。以宋体为例,从一台含中文字体的机器上(Mac下字体在/library/fo...