sir
what are the differences of swing and awt?give explanation.
sir
what are the differences of swing and awt?give explanation.
hi,
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.
Hope you understood the differences between them..
hello
Several consequences result from this difference between AWT and Swing. AWT
is a thin layer of code on top of the OS, whereas Swing is much larger.
Swing also has very much richer functionality. Using AWT, you have to
implement a lot of things yourself, while Swing has them built in. For
GUI-intensive work, AWT feels very primitive to work with compared to Swing.
Because Swing implements GUI functionality itself rather than relying on the
host OS, it can offer a richer environment on all platforms Java runs on.
AWT is more limited in supplying the same functionality on all platforms
because not all platforms implement the same-looking controls in the same
ways.
Swing components are called "lightweight" because they do not require a
native OS object to implement their functionality. JDialog and JFrame are
heavyweight, because they do have a peer. So components like JButton,
JTextArea, etc., are lightweight because they do not have an OS peer. A "peer" is a
widget provided by the operating system, such as a button object or an entry
field object.
hope ur clear now
bye
sowmya
There are currently 1 users browsing this thread. (0 members and 1 guests)