answersLogoWhite

0

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 toimplement 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 platformsbecause not all platforms implement the same-looking controls in the same ways. Swing components are called "lightweight" because they do not require anative 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.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Difference between awt and java script?

AWT is a Java package for creating graphical user interfaces. JavaScript is a completely unrelated programming language.


What is the difference between heavy weight and lightweight programing language in java script?

Applet is a heavy component,Applet uses AWT Layouts..like flow layout,Swing is a light weight component, Using UI Manager, swing have look and feel according


What is AWT and Swing in java?

Swing is a library of GUI controls. Classes in swing are not OS dependent. They do not take the look and feel of the target platform so that they have a consistent appearance.


What are the differences between AWT and swing components in java?

Swing is technologically more advanced than AWT. It has much more features and functions. It has a richer set of components which can modify and change according to the library. It uses MVC which is Model View Controller Paradigm thus offering a more flexible GUI. Swing also has a built in double Buffering and at the same time is lightweight. It is also one hundred percent java based. And therefore provides icons, and also decorative and attractive borders for components and tool tips. The only flaw is that not all swing might act like native component. Swing is required to create a Java program. This tool kit is highly complex with its customizable text package and its integrated accessibility support. Since swing is built on a 2D package it can easily enhance all animations and images. And its undo framework thus supporting innumerable editing. Thus swing definitely beats AWT in all ways.


How does java programming language handle graphics?

Java Graphics APIs - AWT and Swing - provide a huge set of reusable GUI components, such as button, text field, label, choice, panel and frame for building GUI applications. You can simply reuse these classes rather than re-invent the wheels. I shall start with the AWT classes before moving into Swing to give you a complete picture. I have to stress that AWT component classes are now obsoleted by Swing's counterparts.


Why would someone need a Java swing?

Java Swing might be needed by someone because Swing provides a native look and feel that matches the look and feel of several platforms, with more powerful and flexible components than AWT.


What is the difference between container and panel?

In Java, a Container is an AWT superclass which simply describes any Component class that can contain other Component objects. A Panel is a specific type of Container.


What is the difference between a strike swing and miss strike in baseball?

its the same thing just one you swing at and one you watch go by. (reet!)


What is the difference between Lindy Hop and East Coast Swing?

East Coast Swing is a simpler 6-count variation of Lindy Hop.


What is the difference between a Didi car and a swing car?

I think its to do with the patent in didcars which was the original


What are the differences between left swing and right swing doors?

The main difference between left swing and right swing doors is the direction in which they open. A left swing door opens towards the left, while a right swing door opens towards the right. This distinction is important when determining the placement and functionality of doors in a building.


What are the differences between a left swing and a right swing door?

The main difference between a left swing and a right swing door is the direction in which the door opens. A left swing door opens towards the left, while a right swing door opens towards the right. This distinction is important when determining the placement and functionality of the door in a space.