摘要:
可执行包下载地址:https://files.cnblogs.com/files/heyang78/picturesSlideShow_final_230514.rar?t=1684021777&download=true 可执行包及源码下载地址:https://files.cnblogs.com/ 阅读全文
posted @ 2023-05-05 22:28
逆火狂飙
阅读(170)
评论(1)
推荐(0)
摘要:
【问题】 使用graphics.drawString(word, x, y)语句都是在坐标(x,y)处从左向右绘制文字。如欲在(x,y)处居中绘制文字该如何处理? 【解决方案】 使用FontMetrics获得文字的宽度,再向左偏移文字宽度的一半。 【有图有真相】 【示例代码】 package tes 阅读全文
posted @ 2023-05-05 13:37
逆火狂飙
阅读(384)
评论(0)
推荐(0)