answersLogoWhite

0

What is AWT and Swing in java?

Updated: 8/20/2019
User Avatar

Wiki User

9y ago

Best Answer

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.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is AWT and Swing in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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.


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 swing is used in java?

Swing is a package in Java which contains tools for building GUI application. Swing is a part of Java's foundation classes.


Difference between awt and java script?

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


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.


What is the methods with the parameters of an AWT?

AWT (Abstract Window Toolkit) is a top-level Java package. Listing out the hundreds or thousands of methods would be a waste of effort. See the related link below for the Java documentation on the AWT package.


What is the difference between AWT and Swing?

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.


What is awt in java explain its features?

awt contains all the graphical features of java, including many different elements to create an acceptable and usable GUI for applications easily. such as buttons, sliders and text areas.


What is Java Swing Frame?

A top-level window (i.e., a window that is not contained inside another window) is called a frame in Java. The AWT library has a class, called Frame, for this top level. The Swing version of this class is called JFrame and extends the Frame class. The JFrame is one of the few Swing components that is not painted on a canvas. Thus, the decorations (buttons, title bar, icons, and so on) are drawn by the user's windowing system, not by Swing


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


Which are the AWT components in Java?

AWT stands for Abstract window toolkit. AWT gives us the components using which we can create User- Interface based applications in java. Some of the components are: a. Frame b. Panel c. Window d. CheckBox e. RadioButton f. Button g. TextBox h. TextArea i. Etc


Why is itemstatechanged method called thrice on changing an item in java swings?

http://docs.oracle.com/javase/7/docs/api/java/awt/event/ItemListener.html#itemStateChanged%28java.awt.event.ItemEvent%29 "http://docs.oracle.com/javase/7/docs/api/java/awt/event/ItemListener.html#itemStateChanged%28java.awt.event.ItemEvent%29"