what is the difference between AWT and SWING what is the
advantage of using swing?
Answers were Sorted based on User's Feedback
Answer / srinivasan.c
Mainly AWT is platform dependent and swings are platform
independent.For example an interface designed in awt will
give different sizes and layouts of elements based upon the
platform.But swings will give same outputs,this is the
reason why the j2ee deploytool is designed in swings and the
setup files of j2ee are designed in swings
| Is This Answer Correct ? | 17 Yes | 5 No |
Answer / muffy.jad@gmail.com
Swing is a more powerful alternative for awt.Swing is a set
of classes that provides more powerful and flexible
components than awt.In addition to components like
buttons,check boxes and labels they also provide additions
such as tabbed panes,scroll panes and tables.
The main difference between awt and swing is that swing
components are not implemented by platform-specific code,
instead they are written entirely in Java and therefore are
platform-independent.
swing includes more graphic components then awt.Ritesh sharma
AWT - Heavy weight component.
it will invoke native methods.
awt has main() method.
SWING - Light weight component.
It doesn't invoke native methods.
swing has not main()
| Is This Answer Correct ? | 13 Yes | 2 No |
Answer / modi[achir communication]
Difference between AWT and SWING:
Swing provides a richer set of components than AWT. They are
100% Java-based. There are a few other
advantages to Swing over AWT:
• Swing provides both additional components like JTable,
JTree etc and added functionality to AWT-replacement
components.
• Swing components can change their appearance based on the
current “look and feel” library that’s being used.
• Swing components follow the Model-View-Controller (MVC)
paradigm, and thus can provide a much more
flexible UI.
• Swing provides “extras” for components, such as: icons on
many components, decorative borders for
components, tool tips for components etc.
• Swing components are lightweight (less resource intensive
than AWT).
Java
45
• Swing provides built-in double buffering (which means an
off-screen buffer [image] is used during drawing
and then the resulting bits are copied onto the screen. The
resulting image is smoother, less flicker and quicker
than drawing directly on the screen).
• Swing provides paint debugging support for when you build
your own component i.e.-slow motion rendering.
| Is This Answer Correct ? | 6 Yes | 2 No |
How do generics work in java?
What does the exclamation mark mean in java?
suppose we have an interface & that interface contains five methods. if a class implements that interface then we have to bound that to give tha definition of all five methods in that class. If we declare that class as abstract then can we call only two methods to give the deinition of that method & i don't want to give the definition of all the methods? can it possible
What are the four integer types supported by java?
What is the purpose of nested class in java?
What causes memory leaks in java?
Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thread tries to access a particular resource we can lock the method using synchronized keyword. Then after that how the lock is released and how next thread access that.Please explain with example.
Which sort is best in java?
What is r * in math?
What will happens if you opened Internet Explorer 4 times?
Name few java.lang classes introduced with java 8 ?
class A{ class B{ } } in which name u save the file,its the program compile?