float width = 2.0f;//你需要的宽度
Graphics2D g2 = (Graphics2D)g;//之前有一个Graphics的对象为g
g2.setStroke( new BasicStroke( width ) );
g2.drawLine( ... );
drawLine加粗
最新推荐文章于 2020-12-23 11:24:04 发布
float width = 2.0f;//你需要的宽度
Graphics2D g2 = (Graphics2D)g;//之前有一个Graphics的对象为g
g2.setStroke( new BasicStroke( width ) );
g2.drawLine( ... );