Displaying images in a console application?

拥有回忆 提交于 2019-12-06 10:35:25

I am not sure I understand the concern. You should be perfectly able to conditionally pop up either a Swing JFrame or AWT Frame from your console application, am I wrong?

You can use e.g. BufferedImage to construct images, or the utilities in javax.imageio if your image is already in some common format (e.g. PNG, JPEG, BMP). As for displaying to the user, just use the regular Java GUI stuff, either Swing or AWT. Run the GUI in a separate thread if the console part needs to keep processing while the images are being displayed.

The Working with Images tutorial may contain some helpful examples.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!