Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是这个网站的新手,对 Java 也比较陌生。
我创建了一个使用 ACM 图形包并扩展了GraphicsProgram. 我现在希望能够将图形输出窗口的内容转换为图像文件,例如 png 或 jpeg。怎么做?
GraphicsProgram
请参阅ComponentImageCapture,它可以捕获并保存 aComponent或的图像JComponent。
ComponentImageCapture
Component
JComponent