Graphics中画线宽度如何设置
阅读
颜色可以用.setColor(),那宽度呢?
------解决方案--------------------
线没有宽度 就像点没有大小
长条形的rectangle 就是有宽度的线
------解决方案--------------------
Graphics2D g2D = (Graphics)g;
g2D.setStroke(new BasicStroke(2.5f)); //此处2.5f即是画线宽度
g2D.draw(...);
阅读
上一篇:哪位高手能不能把这段代码给仔细的说明一下吗?多谢大家了 下一篇:返回列表