Java的:ImageIcon的图像对比差异 [英] Java: ImageIcon vs. Image difference

查看:480
本文介绍了Java的:ImageIcon的图像对比差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以在小白的方式有什么不同的是betweeen向我解释的ImageIcon 图片类/ Java中的对象?谢谢

Could anyone explain to me in noob way what the difference is betweeen ImageIcon and Image classes/objects in Java? Thanks

推荐答案

它们的性质和应用是不同的。 图片是所有类的抽象超类的再present图形图像。 的ImageIcon 是<$ C $的实现C>图标使用图像界面作为其源。

Their nature and application is different. Image is an abstract superclass of all classes that represent graphical images. ImageIcon is an implementation of Icon interface that uses Image as its source.

编辑:想想一个图片中作为东西能的渲染和的ImageIcon 作为的将会的呈现为图标时,其的paintIcon()方法调用。

Think of an Image as something that could be rendered and an ImageIcon as something that will be rendered as an Icon when its paintIcon() method is called.

编辑:上面的链接将带你到JDK 6 API。这些链接将带您到JDK 8 API:图片的ImageIcon

The links above will take you to the JDK 6 api. These links will take you to the JDK 8 api: Image and ImageIcon.

这篇关于Java的:ImageIcon的图像对比差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆