INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: Difference: AWT, Swing
Answer: AWT is the AbstractWindowToolkit.AWT is the heavy weight component,why Because It hides the peers component to the user.in AWT 2 instances are created,it hides to user.where as swings are the light weight component.it wont create peers component.
|
Question:
Difference: AWT, Swing
Answer:
AWT is the AbstractWindowToolkit.AWT is the heavy weight component,why Because It hides the peers component to the user.in AWT 2 instances are created,it hides to user.where as swings are the light weight component.it wont create peers component. Source: CoolInterview.com
java became famous because of this AWT applets,,, but there was a huge downfall to it , when a AWT was executing it used the native api's to render itself, so let us take an example,,is there was a company logo the logo would look different in windows platform and would look different in MAC, and different in LINUX ... so here the identity of a company is gone..which is a big hit. so they were called heavy weight( as they interacted directly with the native peers in os). Later swing overcame the problem it was written in java (where awt was written in c language) and it instead of communicating with the peers it would communicate with the jvm system calls and then render itself in a uniform way in any platform. This made the swing as light weight...and more flexible also...Now JavaFx will compete with the swing... Source: CoolInterview.com
Answered by: mahanth hiremath | Date: 1/28/2010
| Contact mahanth hiremath
swing is the extension of awt. Source: CoolInterview.com
Answered by: punitsuman | Date: 8/2/2010
| Contact punitsuman
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|