Possible Duplicate:
What is the difference between swing and awt?
I often see that JFrame is used a lots.
But sometimes, I also see that programmer use Frame in their example.
So could you tell me the advantages/disadvantages of them?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well let me break it up for you………….. Before jumping into Frame Vs JFrame, let me explain you about AWT and Swing.
AWT :
– It has a Platform Dependent
Look and Feel.– So it uses the Native GUI components.
– As AWT uses the peer components, its called as Heavy Weight Component.
Swing :
– It has a Platform Independent
Look and Feel.– And its because it uses the Pure Java Components.
– As Swing uses pure java components, its know as Light Weight Component.
Its was said that AWT is faster than Swing as it uses the Platform component, but due the arrival of faster processor, etc …. Its equivalent now..and you get lots of flexibility.
Here is the GUI Tree :
Now Frame is an
AWT component, where as JFrame is aSwing component.You can also that see JFrame extends Frame.
But JFrame, provides lots of functinality and flexibility as compared to Frame, we can even say this that Swing provides better functionality with ease of implementing them.