java.awt.event
Interface ActionListener

All Superinterfaces:
EventListener sample code for java.util.EventListener definition code for java.util.EventListener
All Known Subinterfaces:
Action sample code for javax.swing.Action definition code for javax.swing.Action
All Known Implementing Classes:
AbstractAction sample code for javax.swing.AbstractAction definition code for javax.swing.AbstractAction , AWTEventMulticaster sample code for java.awt.AWTEventMulticaster definition code for java.awt.AWTEventMulticaster , BasicDesktopPaneUI.CloseAction sample code for javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction definition code for javax.swing.plaf.basic.BasicDesktopPaneUI.CloseAction , BasicDesktopPaneUI.MaximizeAction sample code for javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction definition code for javax.swing.plaf.basic.BasicDesktopPaneUI.MaximizeAction , BasicDesktopPaneUI.MinimizeAction sample code for javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction definition code for javax.swing.plaf.basic.BasicDesktopPaneUI.MinimizeAction , BasicDesktopPaneUI.NavigateAction sample code for javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction definition code for javax.swing.plaf.basic.BasicDesktopPaneUI.NavigateAction , BasicDesktopPaneUI.OpenAction sample code for javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction definition code for javax.swing.plaf.basic.BasicDesktopPaneUI.OpenAction , BasicFileChooserUI.ApproveSelectionAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.ApproveSelectionAction , BasicFileChooserUI.CancelSelectionAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.CancelSelectionAction , BasicFileChooserUI.ChangeToParentDirectoryAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.ChangeToParentDirectoryAction , BasicFileChooserUI.GoHomeAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.GoHomeAction , BasicFileChooserUI.NewFolderAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.NewFolderAction , BasicFileChooserUI.UpdateAction sample code for javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction definition code for javax.swing.plaf.basic.BasicFileChooserUI.UpdateAction , BasicInternalFrameTitlePane.CloseAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.CloseAction , BasicInternalFrameTitlePane.IconifyAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.IconifyAction , BasicInternalFrameTitlePane.MaximizeAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.MaximizeAction , BasicInternalFrameTitlePane.MoveAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.MoveAction , BasicInternalFrameTitlePane.RestoreAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction , BasicInternalFrameTitlePane.SizeAction sample code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction definition code for javax.swing.plaf.basic.BasicInternalFrameTitlePane.SizeAction , BasicOptionPaneUI.ButtonActionListener sample code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener definition code for javax.swing.plaf.basic.BasicOptionPaneUI.ButtonActionListener , BasicScrollBarUI.ScrollListener sample code for javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener definition code for javax.swing.plaf.basic.BasicScrollBarUI.ScrollListener , BasicSliderUI.ActionScroller sample code for javax.swing.plaf.basic.BasicSliderUI.ActionScroller definition code for javax.swing.plaf.basic.BasicSliderUI.ActionScroller , BasicSliderUI.ScrollListener sample code for javax.swing.plaf.basic.BasicSliderUI.ScrollListener definition code for javax.swing.plaf.basic.BasicSliderUI.ScrollListener , BasicSplitPaneUI.KeyboardDownRightHandler sample code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler definition code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardDownRightHandler , BasicSplitPaneUI.KeyboardEndHandler sample code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler definition code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardEndHandler , BasicSplitPaneUI.KeyboardHomeHandler sample code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler definition code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardHomeHandler , BasicSplitPaneUI.KeyboardResizeToggleHandler sample code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler definition code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardResizeToggleHandler , BasicSplitPaneUI.KeyboardUpLeftHandler sample code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler definition code for javax.swing.plaf.basic.BasicSplitPaneUI.KeyboardUpLeftHandler , BasicTreeUI.ComponentHandler sample code for javax.swing.plaf.basic.BasicTreeUI.ComponentHandler definition code for javax.swing.plaf.basic.BasicTreeUI.ComponentHandler , BasicTreeUI.TreeCancelEditingAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction , BasicTreeUI.TreeHomeAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction , BasicTreeUI.TreeIncrementAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction , BasicTreeUI.TreePageAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreePageAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreePageAction , BasicTreeUI.TreeToggleAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction , BasicTreeUI.TreeTraverseAction sample code for javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction definition code for javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction , DefaultCellEditor.EditorDelegate sample code for javax.swing.DefaultCellEditor.EditorDelegate definition code for javax.swing.DefaultCellEditor.EditorDelegate , DefaultEditorKit.BeepAction sample code for javax.swing.text.DefaultEditorKit.BeepAction definition code for javax.swing.text.DefaultEditorKit.BeepAction , DefaultEditorKit.CopyAction sample code for javax.swing.text.DefaultEditorKit.CopyAction definition code for javax.swing.text.DefaultEditorKit.CopyAction , DefaultEditorKit.CutAction sample code for javax.swing.text.DefaultEditorKit.CutAction definition code for javax.swing.text.DefaultEditorKit.CutAction , DefaultEditorKit.DefaultKeyTypedAction sample code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction definition code for javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction , DefaultEditorKit.InsertBreakAction sample code for javax.swing.text.DefaultEditorKit.InsertBreakAction definition code for javax.swing.text.DefaultEditorKit.InsertBreakAction , DefaultEditorKit.InsertContentAction sample code for javax.swing.text.DefaultEditorKit.InsertContentAction definition code for javax.swing.text.DefaultEditorKit.InsertContentAction , DefaultEditorKit.InsertTabAction sample code for javax.swing.text.DefaultEditorKit.InsertTabAction definition code for javax.swing.text.DefaultEditorKit.InsertTabAction , DefaultEditorKit.PasteAction sample code for javax.swing.text.DefaultEditorKit.PasteAction definition code for javax.swing.text.DefaultEditorKit.PasteAction , DefaultTreeCellEditor sample code for javax.swing.tree.DefaultTreeCellEditor definition code for javax.swing.tree.DefaultTreeCellEditor , DropTarget.DropTargetAutoScroller sample code for java.awt.dnd.DropTarget.DropTargetAutoScroller definition code for java.awt.dnd.DropTarget.DropTargetAutoScroller , FormView sample code for javax.swing.text.html.FormView definition code for javax.swing.text.html.FormView , HTMLEditorKit.HTMLTextAction sample code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction definition code for javax.swing.text.html.HTMLEditorKit.HTMLTextAction , HTMLEditorKit.InsertHTMLTextAction sample code for javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction definition code for javax.swing.text.html.HTMLEditorKit.InsertHTMLTextAction , JComboBox sample code for javax.swing.JComboBox definition code for javax.swing.JComboBox , List.AccessibleAWTList sample code for java.awt.List.AccessibleAWTList definition code for java.awt.List.AccessibleAWTList , MetalFileChooserUI.DirectoryComboBoxAction sample code for javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction definition code for javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxAction , StyledEditorKit.AlignmentAction sample code for javax.swing.text.StyledEditorKit.AlignmentAction definition code for javax.swing.text.StyledEditorKit.AlignmentAction , StyledEditorKit.BoldAction sample code for javax.swing.text.StyledEditorKit.BoldAction definition code for javax.swing.text.StyledEditorKit.BoldAction , StyledEditorKit.FontFamilyAction sample code for javax.swing.text.StyledEditorKit.FontFamilyAction definition code for javax.swing.text.StyledEditorKit.FontFamilyAction , StyledEditorKit.FontSizeAction sample code for javax.swing.text.StyledEditorKit.FontSizeAction definition code for javax.swing.text.StyledEditorKit.FontSizeAction , StyledEditorKit.ForegroundAction sample code for javax.swing.text.StyledEditorKit.ForegroundAction definition code for javax.swing.text.StyledEditorKit.ForegroundAction , StyledEditorKit.ItalicAction sample code for javax.swing.text.StyledEditorKit.ItalicAction definition code for javax.swing.text.StyledEditorKit.ItalicAction , StyledEditorKit.StyledTextAction sample code for javax.swing.text.StyledEditorKit.StyledTextAction definition code for javax.swing.text.StyledEditorKit.StyledTextAction , StyledEditorKit.UnderlineAction sample code for javax.swing.text.StyledEditorKit.UnderlineAction definition code for javax.swing.text.StyledEditorKit.UnderlineAction , TextAction sample code for javax.swing.text.TextAction definition code for javax.swing.text.TextAction , ToolTipManager.insideTimerAction sample code for javax.swing.ToolTipManager.insideTimerAction definition code for javax.swing.ToolTipManager.insideTimerAction , ToolTipManager.outsideTimerAction sample code for javax.swing.ToolTipManager.outsideTimerAction definition code for javax.swing.ToolTipManager.outsideTimerAction , ToolTipManager.stillInsideTimerAction sample code for javax.swing.ToolTipManager.stillInsideTimerAction definition code for javax.swing.ToolTipManager.stillInsideTimerAction

public interface ActionListener
extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener

The listener interface for receiving action events. The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a component, using the component's addActionListener method. When the action event occurs, that object's actionPerformed method is invoked.

Since:
1.1
See Also:
ActionEvent sample code for java.awt.event.ActionEvent definition code for java.awt.event.ActionEvent , Tutorial: Java 1.1 Event Model, Reference: The Java Class Libraries (update file)

Method Summary
 void actionPerformed sample code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) definition code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) (ActionEvent sample code for java.awt.event.ActionEvent definition code for java.awt.event.ActionEvent  e)
          Invoked when an action occurs.
 

Method Detail

actionPerformed sample code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent) definition code for java.awt.event.ActionListener.actionPerformed(java.awt.event.ActionEvent)

void actionPerformed(ActionEvent sample code for java.awt.event.ActionEvent definition code for java.awt.event.ActionEvent  e)
Invoked when an action occurs.