There are fundamental incompatibilities in the way they draw themselves. AWT Java classes are not "pure" Java classes, they use underlying C/C++ native code (dependable on operation system) that can cause different appearance in different OSs. Swing is pure Java implementation and has no native code at all. Swing applications look the same.
为啥已被重写,经常一个程序还同时引入两个类,把awt淘汰了得了!
Java classes are not "pure" Java classes, they use underlying C/C++ native code
(dependable on operation system) that can cause different appearance in different
OSs. Swing is pure Java implementation and has no native code at all.
Swing applications look the same.
我不认为java是平台独立的.因为要做各个平台的jdk.
其次:
Swing是100%纯java的,即它不包含本地代码,而awt不是,也不可能是.
Swing是在awt基础上做的,因为awt不是平台独立的,所以Swing才有
可能做成平台独立的.另外,MVC结构也值得好好研究.