Package java.awt
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 container 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:
- 1.0
- External Specifications
-
ClassDescriptionAn interface for events that know how to dispatch themselves.The interface for objects which have an adjustable numeric value contained within a bounded range of values.The
AlphaComposite
class implements basic alpha compositing rules for combining source and destination colors to achieve blending and transparency effects with graphics and images.Thrown when a serious Abstract Window Toolkit error has occurred.The root event class for all AWT events.AWTEventMulticaster
implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in thejava.awt.event
package.Signals that an Abstract Window Toolkit exception has occurred.AnAWTKeyStroke
represents a key action on the keyboard, or equivalent input device.This class is for AWT permissions.TheBasicStroke
class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with aGraphics2D
object that has its Stroke attribute set to thisBasicStroke
.A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.Capabilities and properties of buffers.A type-safe enumeration of the possible back buffer contents after page-flippingThis class creates a labeled button.ACanvas
component represents a blank rectangular area of the screen onto which the application can draw or from which the application can trap input events from the user.ACardLayout
object is a layout manager for a container.A check box is a graphical component that can be in either an "on" (true
) or "off" (false
) state.TheCheckboxGroup
class is used to group together a set ofCheckbox
buttons.This class represents a check box that can be included in a menu.TheChoice
class presents a pop-up menu of choices.TheColor
class is used to encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by aColorSpace
.A component is an object having a graphical representation that can be displayed on the screen and that can interact with the user.Enumeration of the common ways the baseline of a component can change as the size changes.The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text.TheComposite
interface, along withCompositeContext
, defines the methods to compose a draw primitive with the underlying graphics area.TheCompositeContext
interface defines the encapsulated and optimized environment for a compositing operation.A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container.A class to encapsulate the bitmap representation of the mouse cursor.A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container.The default KeyboardFocusManager for AWT applications.TheDesktop
class allows interact with various desktop capabilities.Represents an action type.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.Any top-level window can be marked not to be blocked by modal dialogs.Modal dialogs block all input to some top-level windows.TheDimension
class encapsulates the width and height of a component (in integer precision) in a single object.TheDisplayMode
class encapsulates the bit depth, height, width, and refresh rate of aGraphicsDevice
.Deprecated.EventQueue
is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.TheFileDialog
class displays a dialog window from which the user can select a file.A flow layout arranges components in a directional flow, much like lines of text in a paragraph.A FocusTraversalPolicy defines the order in which Components with a particular focus cycle root are traversed.TheFont
class represents fonts, which are used to render text in a visible way.Thrown by method createFont in theFont
class to indicate that the specified font is bad.TheFontMetrics
class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.AFrame
is a top-level window with a title and a border.TheGradientPaint
class provides a way to fill aShape
with a linear color gradient pattern.TheGraphics
class is the abstract base class for all graphics contexts that allow an application to draw onto components that are realized on various devices, as well as onto off-screen images.ThisGraphics2D
class extends theGraphics
class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.TheGraphicsConfigTemplate
class is used to obtain a validGraphicsConfiguration
.TheGraphicsConfiguration
class describes the characteristics of a graphics destination such as a printer or monitor.TheGraphicsDevice
class describes the graphics devices that might be available in a particular graphics environment.Kinds of translucency supported by the underlying system.TheGraphicsEnvironment
class describes the collection ofGraphicsDevice
objects andFont
objects available to a Java(tm) application on a particular platform.TheGridBagConstraints
class specifies constraints for components that are laid out using theGridBagLayout
class.TheGridBagLayout
class is a flexible layout manager that aligns components vertically, horizontally or along their baseline without requiring that the components be of the same size.TheGridBagLayoutInfo
is an utility class forGridBagLayout
layout manager.TheGridLayout
class is a layout manager that lays out a container's components in a rectangular grid.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.Signals that an AWT component is not in an appropriate state for the requested operation.The abstract classImage
is the superclass of all classes that represent graphical images.Capabilities and properties of images.AnInsets
object is a representation of the borders of a container.The interface for objects which contain a set of items for which zero or more can be selected.A set of attributes which control a print job.A type-safe enumeration of possible default selection states.A type-safe enumeration of possible job destinations.A type-safe enumeration of possible dialogs to display to the user.A type-safe enumeration of possible multiple copy handling states.A type-safe enumeration of possible multi-page impositions.The KeyboardFocusManager is responsible for managing the active and focused Windows, and the current focus owner.A KeyEventDispatcher cooperates with the current KeyboardFocusManager in the targeting and dispatching of all KeyEvents.A KeyEventPostProcessor cooperates with the current KeyboardFocusManager in the final resolution of all unconsumed KeyEvents.ALabel
object is a component for placing text in a container.Defines the interface for classes that know how to lay outContainer
s.Defines an interface for classes that know how to layoutContainer
s based on a layout constraints object.TheLinearGradientPaint
class provides a way to fill aShape
with a linear color gradient pattern.TheList
component presents the user with a scrolling list of text items.TheMediaTracker
class is a utility class to track the status of a number of media objects.AMenu
object is a pull-down menu component that is deployed from a menu bar.TheMenuBar
class encapsulates the platform's concept of a menu bar bound to a frame.The abstract classMenuComponent
is the superclass of all menu-related components.The super class of all menu related containers.All items in a menu must belong to the classMenuItem
, or one of its subclasses.TheMenuShortcut
class represents a keyboard accelerator for a MenuItem.MouseInfo
provides methods for getting information about the mouse, such as mouse pointer location and the number of mouse buttons.This is the superclass for Paints which use a multiple color gradient to fill in their raster.The color space in which to perform the gradient interpolation.The method to use when painting outside the gradient bounds.A set of attributes which control the output of a printed page.A type-safe enumeration of possible color states.A type-safe enumeration of possible paper sizes.A type-safe enumeration of possible orientations.A type-safe enumeration of possible origins.A type-safe enumeration of possible print qualities.ThisPaint
interface defines how color patterns can be generated forGraphics2D
operations.ThePaintContext
interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on aGraphics2D
.Panel
is the simplest container class.A point representing a location in(x,y)
coordinate space, specified in integer precision.A class that describes the pointer position.ThePolygon
class encapsulates a description of a closed, two-dimensional region within a coordinate space.A class that implements a menu which can be dynamically popped up at a specified position within a component.An abstract class which provides a print graphics context for a page.An abstract class which initiates and executes a print job.TheRadialGradientPaint
class provides a way to fill a shape with a circular radial color gradient pattern.ARectangle
specifies an area in a coordinate space that is enclosed by theRectangle
object's upper-left point(x,y)
in the coordinate space, its width, and its height.TheRenderingHints
class defines and manages collections of keys and associated values which allow an application to provide input into the choice of algorithms used by other classes which perform rendering and image manipulation services.Defines the base type of all keys used along with theRenderingHints
class to control various algorithm choices in the rendering and imaging pipelines.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.TheScrollbar
class embodies a scroll bar, a familiar user-interface object.A container class which implements automatic horizontal and/or vertical scrolling for a single child component.This class represents the state of a horizontal or vertical scrollbar of aScrollPane
.A helper interface to run the nested event loop.TheShape
interface provides definitions for objects that represent some form of geometric shape.The splash screen can be displayed at application startup, before the Java Virtual Machine (JVM) starts.TheStroke
interface allows aGraphics2D
object to obtain aShape
that is the decorated outline, or stylistic representation of the outline, of the specifiedShape
.A class to encapsulate symbolic colors representing the color of native GUI objects on a system.TheSystemTray
class represents the system tray for a desktop.TheTaskbar
class allows a Java application to interact with the system task area (taskbar, Dock, etc.).List of provided features.Kinds of available window progress states.ATextArea
object is a multi-line region that displays text.TheTextComponent
class is the superclass of any component that allows the editing of some text.ATextField
object is a text component that allows for the editing of a single line of text.TheTexturePaint
class provides a way to fill aShape
with a texture that is specified as aBufferedImage
.This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.TheTransparency
interface defines the common transparency modes for implementing classes.ATrayIcon
object represents a tray icon that can be added to thesystem tray
.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.AWindow
object is a top-level window with no borders and no menubar.Enumeration of available window types.
AWTEvent
and its subclasses be used instead