Package java.awt
Contains all of the classes for creating user interfaces and for painting graphics and images.
See: Description
Interface | Description |
---|---|
ActiveEvent | An interface for events that know how to dispatch themselves. |
Adjustable | The interface for objects which have an adjustable numeric value contained within a bounded range of values. |
Composite | The |
CompositeContext | The |
ItemSelectable | The interface for objects which contain a set of items for which zero or more can be selected. |
KeyEventDispatcher | A KeyEventDispatcher cooperates with the current KeyboardFocusManager in the targeting and dispatching of all KeyEvents. |
KeyEventPostProcessor | A KeyEventPostProcessor cooperates with the current KeyboardFocusManager in the final resolution of all unconsumed KeyEvents. |
LayoutManager | Defines the interface for classes that know how to lay out |
LayoutManager2 | Defines an interface for classes that know how to layout Containers based on a layout constraints object. |
MenuContainer | The super class of all menu related containers. |
Paint | This |
PaintContext | The |
PrintGraphics | An abstract class which provides a print graphics context for a page. |
SecondaryLoop | A helper interface to run the nested event loop. |
Shape | The |
Stroke | The |
Transparency | The |
Class | Description |
---|---|
AlphaComposite | The |
AWTEvent | The root event class for all AWT events. |
AWTEventMulticaster |
|
AWTKeyStroke | An |
AWTPermission | This class is for AWT permissions. |
BasicStroke | The |
BorderLayout | A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center. |
BufferCapabilities | Capabilities and properties of buffers. |
BufferCapabilities.FlipContents | A type-safe enumeration of the possible back buffer contents after page-flipping |
Button | This class creates a labeled button. |
Canvas | A |
CardLayout | A |
Checkbox | A check box is a graphical component that can be in either an "on" ( |
CheckboxGroup | The |
CheckboxMenuItem | This class represents a check box that can be included in a menu. |
Choice | The |
Color | The |
Component | A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user. |
ComponentOrientation | The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text. |
Container | A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components. |
ContainerOrderFocusTraversalPolicy | A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container. |
Cursor | A class to encapsulate the bitmap representation of the mouse cursor. |
DefaultFocusTraversalPolicy | A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container. |
DefaultKeyboardFocusManager | The default KeyboardFocusManager for AWT applications. |
Desktop | The |
Dialog | A Dialog is a top-level window with a title and a border that is typically used to take some form of input from the user. |
Dimension | The |
DisplayMode | The |
Event | NOTE: The |
EventQueue |
|
FileDialog | The |
FlowLayout | A flow layout arranges components in a directional flow, much like lines of text in a paragraph. |
FocusTraversalPolicy | A FocusTraversalPolicy defines the order in which Components with a particular focus cycle root are traversed. |
Font | The |
FontMetrics | The |
Frame | A |
GradientPaint | The |
Graphics | The |
Graphics2D | This |
GraphicsConfigTemplate | The |
GraphicsConfiguration | The |
GraphicsDevice | The |
GraphicsEnvironment | The |
GridBagConstraints | The |
GridBagLayout | The |
GridBagLayoutInfo | The |
GridLayout | The |
Image | The abstract class |
ImageCapabilities | Capabilities and properties of images. |
Insets | An |
JobAttributes | A set of attributes which control a print job. |
JobAttributes.DefaultSelectionType | A type-safe enumeration of possible default selection states. |
JobAttributes.DestinationType | A type-safe enumeration of possible job destinations. |
JobAttributes.DialogType | A type-safe enumeration of possible dialogs to display to the user. |
JobAttributes.MultipleDocumentHandlingType | A type-safe enumeration of possible multiple copy handling states. |
JobAttributes.SidesType | A type-safe enumeration of possible multi-page impositions. |
KeyboardFocusManager | The KeyboardFocusManager is responsible for managing the active and focused Windows, and the current focus owner. |
Label | A |
LinearGradientPaint | The |
List | The |
MediaTracker | The |
Menu | A |
MenuBar | The |
MenuComponent | The abstract class |
MenuItem | All items in a menu must belong to the class |
MenuShortcut | The |
MouseInfo |
|
MultipleGradientPaint | This is the superclass for Paints which use a multiple color gradient to fill in their raster. |
PageAttributes | A set of attributes which control the output of a printed page. |
PageAttributes.ColorType | A type-safe enumeration of possible color states. |
PageAttributes.MediaType | A type-safe enumeration of possible paper sizes. |
PageAttributes.OrientationRequestedType | A type-safe enumeration of possible orientations. |
PageAttributes.OriginType | A type-safe enumeration of possible origins. |
PageAttributes.PrintQualityType | A type-safe enumeration of possible print qualities. |
Panel |
|
Point | A point representing a location in |
PointerInfo | A class that describes the pointer position. |
Polygon | The |
PopupMenu | A class that implements a menu which can be dynamically popped up at a specified position within a component. |
PrintJob | An abstract class which initiates and executes a print job. |
RadialGradientPaint | The |
Rectangle | A |
RenderingHints | The |
RenderingHints.Key | Defines the base type of all keys used along with the |
Robot | This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. |
Scrollbar | The |
ScrollPane | A container class which implements automatic horizontal and/or vertical scrolling for a single child component. |
ScrollPaneAdjustable | This class represents the state of a horizontal or vertical scrollbar of a |
SplashScreen | The splash screen can be displayed at application startup, before the Java Virtual Machine (JVM) starts. |
SystemColor | A class to encapsulate symbolic colors representing the color of native GUI objects on a system. |
SystemTray | The |
TextArea | A |
TextComponent | The |
TextField | A |
TexturePaint | The |
Toolkit | This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit. |
TrayIcon | A |
Window | A |
Enum | Description |
---|---|
Component.BaselineResizeBehavior | Enumeration of the common ways the baseline of a component can change as the size changes. |
Desktop.Action | Represents an action type. |
Dialog.ModalExclusionType | Any top-level window can be marked not to be blocked by modal dialogs. |
Dialog.ModalityType | Modal dialogs block all input to some top-level windows. |
GraphicsDevice.WindowTranslucency | Kinds of translucency supported by the underlying system. |
MultipleGradientPaint.ColorSpaceType | The color space in which to perform the gradient interpolation. |
MultipleGradientPaint.CycleMethod | The method to use when painting outside the gradient bounds. |
TrayIcon.MessageType | The message type determines which icon will be displayed in the caption of the message, and a possible system sound a message may generate upon showing. |
Window.Type | Enumeration of available window types. |
Exception | Description |
---|---|
AWTException | Signals that an Abstract Window Toolkit exception has occurred. |
FontFormatException | Thrown by method createFont in the |
HeadlessException | Thrown when code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse. |
IllegalComponentStateException | Signals that an AWT component is not in an appropriate state for the requested operation. |
Error | Description |
---|---|
AWTError | Thrown when a serious Abstract Window Toolkit error has occurred. |
Package java.awt Description
Contains all of the classes for creating user interfaces and for painting graphics and images. A user interface object such as a button or a scrollbar is called, in AWT terminology, a component. The Component class is the root of all AWT components. See Component for a detailed description of properties that all AWT components share.
Some components fire events when a user interacts with the components. The AWTEvent class and its subclasses are used to represent the events that AWT components can fire. See AWTEvent for a description of the AWT event model.
A container is a component that can contain components and other containers. A con tainer can also have a layout manager that controls the visual placement of components in the container. The AWT package contains several layout manager classes and an interface for building your own layout manager. See Container and LayoutManager for more information.
Each Component
object is limited in its maximum size and its location because the values are stored as an integer. Also, a platform may further restrict maximum size and location coordinates. The exact maximum values are dependent on the platform. There is no way to change these maximum values, either in Java code or in native code. These limitations also impose restrictions on component layout. If the bounds of a Component object exceed a platform limit, there is no way to properly arrange them within a Container object. The object's bounds are defined by any object's coordinate in combination with its size on a respective axis.
Additional Specification
- Since:
- JDK1.0
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/javase/8/docs/api/java/awt/package-summary.html