java的轻重量级组件heavyweight component and lightweight component

最近在学习java的gui,接触到了轻重量级组件的概念。


重量级组件:就像gui中的AWT组件,使用了系统的一些资源背景,所以不是纯java组件。


轻量级组件:完全用java写成的组件。这种组件有跨平台效果相同的有点,大部分swing组件都是轻量级组件。但是JFrame是个例外。所以如果有题目说swing是轻量级组件是错的。



heavyweight components: they use operating system specific code in the background and are only partially written in Java. 

Lightweight components: Written entirely in Java. Most Swing components are lightweight. 

猜你喜欢

转载自blog.csdn.net/qq_30117591/article/details/80345280
今日推荐