Package java.awt

Interface Summary
ActiveEvent sample code for java.awt.ActiveEvent definition code for java.awt.ActiveEvent An interface for events that know how to dispatch themselves.
Adjustable sample code for java.awt.Adjustable definition code for java.awt.Adjustable The interface for objects which have an adjustable numeric value contained within a bounded range of values.
Composite sample code for java.awt.Composite definition code for java.awt.Composite The Composite interface, along with CompositeContext sample code for java.awt.CompositeContext definition code for java.awt.CompositeContext , defines the methods to compose a draw primitive with the underlying graphics area.
CompositeContext sample code for java.awt.CompositeContext definition code for java.awt.CompositeContext The CompositeContext interface defines the encapsulated and optimized environment for a compositing operation.
ItemSelectable sample code for java.awt.ItemSelectable definition code for java.awt.ItemSelectable The interface for objects which contain a set of items for which zero or more can be selected.
KeyEventDispatcher sample code for java.awt.KeyEventDispatcher definition code for java.awt.KeyEventDispatcher A KeyEventDispatcher cooperates with the current KeyboardFocusManager in the targeting and dispatching of all KeyEvents.
KeyEventPostProcessor sample code for java.awt.KeyEventPostProcessor definition code for java.awt.KeyEventPostProcessor A KeyEventPostProcessor cooperates with the current KeyboardFocusManager in the final resolution of all unconsumed KeyEvents.
LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager Defines the interface for classes that know how to lay out Containers.
LayoutManager2 sample code for java.awt.LayoutManager2 definition code for java.awt.LayoutManager2 Defines an interface for classes that know how to layout Containers based on a layout constraints object.
MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer The super class of all menu related containers.
Paint sample code for java.awt.Paint definition code for java.awt.Paint This Paint interface defines how color patterns can be generated for Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D operations.
PaintContext sample code for java.awt.PaintContext definition code for java.awt.PaintContext The PaintContext interface defines the encapsulated and optimized environment to generate color patterns in device space for fill or stroke operations on a Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D .
PrintGraphics sample code for java.awt.PrintGraphics definition code for java.awt.PrintGraphics An abstract class which provides a print graphics context for a page.
Shape sample code for java.awt.Shape definition code for java.awt.Shape The Shape interface provides definitions for objects that represent some form of geometric shape.
Stroke sample code for java.awt.Stroke definition code for java.awt.Stroke The Stroke interface allows a Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D object to obtain a Shape sample code for java.awt.Shape definition code for java.awt.Shape that is the decorated outline, or stylistic representation of the outline, of the specified Shape.
Transparency sample code for java.awt.Transparency definition code for java.awt.Transparency The Transparency interface defines the common transparency modes for implementing classes.
 

Class Summary
AlphaComposite sample code for java.awt.AlphaComposite definition code for java.awt.AlphaComposite The AlphaComposite class implements basic alpha compositing rules for combining source and destination colors to achieve blending and transparency effects with graphics and images.
AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent The root event class for all AWT events.
AWTEventMulticaster sample code for java.awt.AWTEventMulticaster definition code for java.awt.AWTEventMulticaster A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package.
AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke An AWTKeyStroke represents a key action on the keyboard, or equivalent input device.
AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission This class is for AWT permissions.
BasicStroke sample code for java.awt.BasicStroke definition code for java.awt.BasicStroke The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D object that has its Stroke attribute set to this BasicStroke.
BorderLayout sample code for java.awt.BorderLayout definition code for java.awt.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 sample code for java.awt.BufferCapabilities definition code for java.awt.BufferCapabilities Capabilities and properties of buffers.
BufferCapabilities.FlipContents sample code for java.awt.BufferCapabilities.FlipContents definition code for java.awt.BufferCapabilities.FlipContents A type-safe enumeration of the possible back buffer contents after page-flipping
Button sample code for java.awt.Button definition code for java.awt.Button This class creates a labeled button.
Canvas sample code for java.awt.Canvas definition code for java.awt.Canvas A Canvas 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.
CardLayout sample code for java.awt.CardLayout definition code for java.awt.CardLayout A CardLayout object is a layout manager for a container.
Checkbox sample code for java.awt.Checkbox definition code for java.awt.Checkbox A check box is a graphical component that can be in either an "on" (true) or "off" (false) state.
CheckboxGroup sample code for java.awt.CheckboxGroup definition code for java.awt.CheckboxGroup The CheckboxGroup class is used to group together a set of Checkbox buttons.
CheckboxMenuItem sample code for java.awt.CheckboxMenuItem definition code for java.awt.CheckboxMenuItem This class represents a check box that can be included in a menu.
Choice sample code for java.awt.Choice definition code for java.awt.Choice The Choice class presents a pop-up menu of choices.
Color sample code for java.awt.Color definition code for java.awt.Color The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary color spaces identified by a ColorSpace sample code for java.awt.color.ColorSpace definition code for java.awt.color.ColorSpace .
Component sample code for java.awt.Component definition code for java.awt.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 sample code for java.awt.ComponentOrientation definition code for java.awt.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 sample code for java.awt.Container definition code for java.awt.Container A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT components.
ContainerOrderFocusTraversalPolicy sample code for java.awt.ContainerOrderFocusTraversalPolicy definition code for java.awt.ContainerOrderFocusTraversalPolicy A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container.
Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor A class to encapsulate the bitmap representation of the mouse cursor.
DefaultFocusTraversalPolicy sample code for java.awt.DefaultFocusTraversalPolicy definition code for java.awt.DefaultFocusTraversalPolicy A FocusTraversalPolicy that determines traversal order based on the order of child Components in a Container.
DefaultKeyboardFocusManager sample code for java.awt.DefaultKeyboardFocusManager definition code for java.awt.DefaultKeyboardFocusManager The default KeyboardFocusManager for AWT applications.
Dialog sample code for java.awt.Dialog definition code for java.awt.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 sample code for java.awt.Dimension definition code for java.awt.Dimension The Dimension class encapsulates the width and height of a component (in integer precision) in a single object.
DisplayMode sample code for java.awt.DisplayMode definition code for java.awt.DisplayMode The DisplayMode class encapsulates the bit depth, height, width, and refresh rate of a GraphicsDevice.
Event sample code for java.awt.Event definition code for java.awt.Event NOTE: The Event class is obsolete and is available only for backwards compatilibility.
EventQueue sample code for java.awt.EventQueue definition code for java.awt.EventQueue EventQueue is a platform-independent class that queues events, both from the underlying peer classes and from trusted application classes.
FileDialog sample code for java.awt.FileDialog definition code for java.awt.FileDialog The FileDialog class displays a dialog window from which the user can select a file.
FlowLayout sample code for java.awt.FlowLayout definition code for java.awt.FlowLayout A flow layout arranges components in a directional flow, much like lines of text in a paragraph.
FocusTraversalPolicy sample code for java.awt.FocusTraversalPolicy definition code for java.awt.FocusTraversalPolicy A FocusTraversalPolicy defines the order in which Components with a particular focus cycle root are traversed.
Font sample code for java.awt.Font definition code for java.awt.Font The Font class represents fonts, which are used to render text in a visible way.
FontMetrics sample code for java.awt.FontMetrics definition code for java.awt.FontMetrics The FontMetrics class defines a font metrics object, which encapsulates information about the rendering of a particular font on a particular screen.
Frame sample code for java.awt.Frame definition code for java.awt.Frame A Frame is a top-level window with a title and a border.
GradientPaint sample code for java.awt.GradientPaint definition code for java.awt.GradientPaint The GradientPaint class provides a way to fill a Shape sample code for java.awt.Shape definition code for java.awt.Shape with a linear color gradient pattern.
Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics The Graphics 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.
Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D This Graphics2D class extends the Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics class to provide more sophisticated control over geometry, coordinate transformations, color management, and text layout.
GraphicsConfigTemplate sample code for java.awt.GraphicsConfigTemplate definition code for java.awt.GraphicsConfigTemplate The GraphicsConfigTemplate class is used to obtain a valid GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration .
GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration The GraphicsConfiguration class describes the characteristics of a graphics destination such as a printer or monitor.
GraphicsDevice sample code for java.awt.GraphicsDevice definition code for java.awt.GraphicsDevice The GraphicsDevice class describes the graphics devices that might be available in a particular graphics environment.
GraphicsEnvironment sample code for java.awt.GraphicsEnvironment definition code for java.awt.GraphicsEnvironment The GraphicsEnvironment class describes the collection of GraphicsDevice sample code for java.awt.GraphicsDevice definition code for java.awt.GraphicsDevice objects and Font sample code for java.awt.Font definition code for java.awt.Font objects available to a Java(tm) application on a particular platform.
GridBagConstraints sample code for java.awt.GridBagConstraints definition code for java.awt.GridBagConstraints The GridBagConstraints class specifies constraints for components that are laid out using the GridBagLayout class.
GridBagLayout sample code for java.awt.GridBagLayout definition code for java.awt.GridBagLayout The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.
GridLayout sample code for java.awt.GridLayout definition code for java.awt.GridLayout The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
Image sample code for java.awt.Image definition code for java.awt.Image The abstract class Image is the superclass of all classes that represent graphical images.
ImageCapabilities sample code for java.awt.ImageCapabilities definition code for java.awt.ImageCapabilities Capabilities and properties of images.
Insets sample code for java.awt.Insets definition code for java.awt.Insets An Insets object is a representation of the borders of a container.
JobAttributes sample code for java.awt.JobAttributes definition code for java.awt.JobAttributes A set of attributes which control a print job.
JobAttributes.DefaultSelectionType sample code for java.awt.JobAttributes.DefaultSelectionType definition code for java.awt.JobAttributes.DefaultSelectionType A type-safe enumeration of possible default selection states.
JobAttributes.DestinationType sample code for java.awt.JobAttributes.DestinationType definition code for java.awt.JobAttributes.DestinationType A type-safe enumeration of possible job destinations.
JobAttributes.DialogType sample code for java.awt.JobAttributes.DialogType definition code for java.awt.JobAttributes.DialogType A type-safe enumeration of possible dialogs to display to the user.
JobAttributes.MultipleDocumentHandlingType sample code for java.awt.JobAttributes.MultipleDocumentHandlingType definition code for java.awt.JobAttributes.MultipleDocumentHandlingType A type-safe enumeration of possible multiple copy handling states.
JobAttributes.SidesType sample code for java.awt.JobAttributes.SidesType definition code for java.awt.JobAttributes.SidesType A type-safe enumeration of possible multi-page impositions.
KeyboardFocusManager sample code for java.awt.KeyboardFocusManager definition code for java.awt.KeyboardFocusManager The KeyboardFocusManager is responsible for managing the active and focused Windows, and the current focus owner.
Label sample code for java.awt.Label definition code for java.awt.Label A Label object is a component for placing text in a container.
List sample code for java.awt.List definition code for java.awt.List The List component presents the user with a scrolling list of text items.
MediaTracker sample code for java.awt.MediaTracker definition code for java.awt.MediaTracker The MediaTracker class is a utility class to track the status of a number of media objects.
Menu sample code for java.awt.Menu definition code for java.awt.Menu A Menu object is a pull-down menu component that is deployed from a menu bar.
MenuBar sample code for java.awt.MenuBar definition code for java.awt.MenuBar The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame.
MenuComponent sample code for java.awt.MenuComponent definition code for java.awt.MenuComponent The abstract class MenuComponent is the superclass of all menu-related components.
MenuItem sample code for java.awt.MenuItem definition code for java.awt.MenuItem All items in a menu must belong to the class MenuItem, or one of its subclasses.
MenuShortcut sample code for java.awt.MenuShortcut definition code for java.awt.MenuShortcut The MenuShortcutclass represents a keyboard accelerator for a MenuItem.
MouseInfo sample code for java.awt.MouseInfo definition code for java.awt.MouseInfo MouseInfo provides methods for getting information about the mouse, such as mouse pointer location and the number of mouse buttons.
PageAttributes sample code for java.awt.PageAttributes definition code for java.awt.PageAttributes A set of attributes which control the output of a printed page.
PageAttributes.ColorType sample code for java.awt.PageAttributes.ColorType definition code for java.awt.PageAttributes.ColorType A type-safe enumeration of possible color states.
PageAttributes.MediaType sample code for java.awt.PageAttributes.MediaType definition code for java.awt.PageAttributes.MediaType A type-safe enumeration of possible paper sizes.
PageAttributes.OrientationRequestedType sample code for java.awt.PageAttributes.OrientationRequestedType definition code for java.awt.PageAttributes.OrientationRequestedType A type-safe enumeration of possible orientations.
PageAttributes.OriginType sample code for java.awt.PageAttributes.OriginType definition code for java.awt.PageAttributes.OriginType A type-safe enumeration of possible origins.
PageAttributes.PrintQualityType sample code for java.awt.PageAttributes.PrintQualityType definition code for java.awt.PageAttributes.PrintQualityType A type-safe enumeration of possible print qualities.
Panel sample code for java.awt.Panel definition code for java.awt.Panel Panel is the simplest container class.
Point sample code for java.awt.Point definition code for java.awt.Point A point representing a location in (x, y) coordinate space, specified in integer precision.
PointerInfo sample code for java.awt.PointerInfo definition code for java.awt.PointerInfo A class that describes the pointer position.
Polygon sample code for java.awt.Polygon definition code for java.awt.Polygon The Polygon class encapsulates a description of a closed, two-dimensional region within a coordinate space.
PopupMenu sample code for java.awt.PopupMenu definition code for java.awt.PopupMenu A class that implements a menu which can be dynamically popped up at a specified position within a component.
PrintJob sample code for java.awt.PrintJob definition code for java.awt.PrintJob An abstract class which initiates and executes a print job.
Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-left point (xy) in the coordinate space, its width, and its height.
RenderingHints sample code for java.awt.RenderingHints definition code for java.awt.RenderingHints The RenderingHints class contains rendering hints that can be used by the Graphics2D sample code for java.awt.Graphics2D definition code for java.awt.Graphics2D class, and classes that implement BufferedImageOp sample code for java.awt.image.BufferedImageOp definition code for java.awt.image.BufferedImageOp and Raster sample code for java.awt.image.Raster definition code for java.awt.image.Raster .
RenderingHints.Key sample code for java.awt.RenderingHints.Key definition code for java.awt.RenderingHints.Key Defines the base type of all keys used to control various aspects of the rendering and imaging pipelines.
Robot sample code for java.awt.Robot definition code for java.awt.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 sample code for java.awt.Scrollbar definition code for java.awt.Scrollbar The Scrollbar class embodies a scroll bar, a familiar user-interface object.
ScrollPane sample code for java.awt.ScrollPane definition code for java.awt.ScrollPane A container class which implements automatic horizontal and/or vertical scrolling for a single child component.
ScrollPaneAdjustable sample code for java.awt.ScrollPaneAdjustable definition code for java.awt.ScrollPaneAdjustable This class represents the state of a horizontal or vertical scrollbar of a ScrollPane.
SystemColor sample code for java.awt.SystemColor definition code for java.awt.SystemColor A class to encapsulate symbolic colors representing the color of native GUI objects on a system.
TextArea sample code for java.awt.TextArea definition code for java.awt.TextArea A TextArea object is a multi-line region that displays text.
TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent The TextComponent class is the superclass of any component that allows the editing of some text.
TextField sample code for java.awt.TextField definition code for java.awt.TextField A TextField object is a text component that allows for the editing of a single line of text.
TexturePaint sample code for java.awt.TexturePaint definition code for java.awt.TexturePaint The TexturePaint class provides a way to fill a Shape sample code for java.awt.Shape definition code for java.awt.Shape with a texture that is specified as a BufferedImage sample code for java.awt.image.BufferedImage definition code for java.awt.image.BufferedImage .
Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit.
Window sample code for java.awt.Window definition code for java.awt.Window A Window object is a top-level window with no borders and no menubar.
 

Exception Summary
AWTException sample code for java.awt.AWTException definition code for java.awt.AWTException Signals that an Absract Window Toolkit exception has occurred.
FontFormatException sample code for java.awt.FontFormatException definition code for java.awt.FontFormatException Thrown by method createFont in the Font class to indicate that the specified font is bad.
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.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 sample code for java.awt.IllegalComponentStateException definition code for java.awt.IllegalComponentStateException Signals that an AWT component is not in an appropriate state for the requested operation.
 

Error Summary
AWTError sample code for java.awt.AWTError definition code for java.awt.AWTError Thrown when a serious Abstract Window Toolkit error has occurred.