- Java AWT GUI is part of the Java SE (Standard Edition) platform and is available in the
java.awt
package. - In other words, Java AWT GUI is part of the Java Foundation Classes (JFC).
- In Java, AWT (Abstract Window Toolkit) is one of the core libraries for creating Graphical User Interfaces (GUIs).
- AWT (Abstract Window Toolkit) is a graphical user interface (GUI) toolkit included in the Java programming language.
- AWT provides a set of classes and methods to create windows, buttons, text fields, labels, and other GUI components.
- In Java, AWT (Abstract Window Toolkit) is a set of classes and APIs (Application Programming Interfaces) that allows us to create graphical user interfaces (GUI) for Java applications.
- AWT provides a collection of GUI components such as buttons, labels, text fields, etc., along with various layout managers to arrange and organize these components on a window to develop GUI applications.
- AWT provides more components, layout managers, and event-handling mechanisms to create sophisticated graphical interfaces.
- AWT is an older/earliest GUI library and frameworks, and Swing (part of the Java Foundation Classes, or JFC) and JavaFX are more commonly used for GUI development in Java.
- AWT components are heavyweight, i.e., they rely on the underlying platform’s windowing system for rendering. Here are some of the commonly used AWT classes and components:-
-
Frame: The
Frame
class represents a top-level window with a title bar and borders. -
Panel: The
Panel
class is a container that can hold and organize other components. -
Label: The
Label
class is used to display a short text message. - Dialog: This represents a dialog box or a pop-up window.
-
Button: The
Button
class represents a push button. -
TextField: The
TextField
class is an input component for single-line text input. -
TextArea: The
TextArea
class is an input component for multiline text input. -
Checkbox: The
Checkbox
class represents a checkbox component. -
CheckboxGroup: The
CheckboxGroup
class is used to group multiple checkboxes together. -
RadioButton: The
RadioButton
class represents a radio button component. -
Choice: The
Choice
class is a drop-down menu for selecting one item from a list. -
List: The
List
class represents a scrollable list of items. -
Menu: Represents a menu bar or a pull-down menu.
-
MenuItem: Represents an individual item in a menu.
-
MenuBar: This represents a horizontal menu bar.
-
MenuBar, Menu, MenuItem: These classes are used to create menus and menu items in a GUI.
-
Panel: A container for grouping and arranging components.
-
Layout: A set of rules for positioning and sizing components within a container.
-
Event: Represents an event triggered by user actions, such as button clicks or mouse events.
-
0 Comments