Swing , AWT , AWT Event Classes and Interfaces


### `java.awt.event.*` Classes and Interfaces


1. **Classes**:

   - `ActionEvent`: Represents an action event triggered by a user action, such as clicking a button.

   - `AdjustmentEvent`: Indicates a change in an adjustable component, like a scrollbar.

   - `ComponentEvent`: Signals changes in a component's state, such as visibility or size.

   - `FocusEvent`: Indicates changes in component focus, like gaining or losing focus.

   - `InputEvent`: Represents events from keyboard and mouse input.

   - `ItemEvent`: Indicates changes in state of items, like selections in a list or checkbox.

   - `KeyEvent`: Represents key events generated by keyboard input.

   - `MouseEvent`: Indicates mouse events, such as clicks, movements, and drags.

   - `MouseWheelEvent`: Represents mouse wheel movement events.

   - `TextEvent`: Indicates changes in text components, such as typing or pasting text.

   - `WindowEvent`: Signals changes in window state, like opening, closing, or resizing.


2. **Interfaces**:

   - `ActionListener`: Listens for action events, like button clicks.

   - `AdjustmentListener`: Listens for changes in adjustable components, such as scrollbars.

   - `ComponentListener`: Listens for changes in component state.

   - `ContainerListener`: Listens for changes in container components.

   - `FocusListener`: Listens for changes in component focus.

   - `ItemListener`: Listens for changes in item selection, like checkboxes or lists.

   - `KeyListener`: Listens for key events from keyboard input.

   - `MouseListener`: Listens for mouse events, such as clicks or movements.

   - `MouseMotionListener`: Listens for mouse movement events.

   - `MouseWheelListener`: Listens for mouse wheel movement events.

   - `TextListener`: Listens for text-related events in text components.

   - `WindowListener`: Listens for window state changes.

   - `WindowStateListener`: Listens for specific changes in window state.


### `java.awt.*` Classes


1. **Classes**:

   - `Button`: A push-button component that triggers an action when clicked.

   - `Canvas`: A blank area onto which custom graphics can be drawn.

   - `Checkbox`: A graphical checkbox component that can be selected or deselected.

   - `Choice`: A drop-down menu of choices from which the user can select one.

   - `Component`: Base class for all AWT components, providing methods for size, position, and visibility.

   - `Container`: A component that can contain other components.

   - `Dialog`: A top-level window with a title and potentially a menu bar.

   - `Dimension`: Represents the size of components or spaces.

   - `Event`: A low-level event class that encapsulates events from AWT components.

   - `FileDialog`: A dialog box for selecting files from the file system.

   - `Font`: Represents fonts used for text rendering.

   - `Frame`: A top-level window with a title and decorations.

   - `Graphics`: The abstract base class for all graphics contexts that allow an application to draw onto components.

   - `Image`: Represents an image to be displayed on the screen.

   - `Label`: A display area for a short text string or an image.

   - `List`: A component that allows the user to select one or more items from a list.

   - `Menu`: A menu that can be added to a menu bar or a popup menu.

   - `MenuBar`: The menu bar that can be added to a frame.

   - `MenuItem`: An item in a menu, either a pull-down menu or a popup menu.

   - `Panel`: A generic container for organizing components.

   - `Point`: Represents a location in (x, y) coordinate space.

   - `Rectangle`: Represents a rectangle with integer coordinates.

   - `Scrollbar`: Represents a horizontal or vertical scrollbar.

   - `TextArea`: A multi-line area that displays plain text.

   - `TextField`: A single-line text input field.

   - `Window`: A top-level window with no border and no menubar.


2. **Interfaces**:

   - `Layout`: Interface for laying out components in a container.

   - `LayoutBounds`: Interface for defining the layout bounds of a container.


### `javax.swing.*` Classes


1. **Classes**:

   - `AbstractAction`: An abstract class that provides default behavior for `Action` objects.

   - `AbstractButton`: An abstract class that serves as the base for swing buttons (`JButton`, `JCheckBox`, etc.).

   - `Box`: A container that uses a BoxLayout object as its layout manager.

   - `DefaultComboBoxModel`: A default implementation of the `ComboBoxModel` interface.

   - `DefaultListModel`: A default implementation of the `ListModel` interface.

   - `Icon`: An interface used to paint icons on components.

   - `InputMap`: A hashtable used to map `KeyStroke` objects to objects.

   - `JApplet`: A subclass of `Applet` that adds support for Swing components.

   - `JButton`: A standard button that can contain text and/or an icon.

   - `JCheckBox`: A checkbox that can be selected or deselected.

   - `JCheckBoxMenuItem`: A menu item that can be selected or deselected.

   - `JColorChooser`: A pane that lets the user choose a color.

   - `JComboBox`: A component that combines a button or editable field and a drop-down list.

   - `JDesktopPane`: A container used to create a multiple-document interface (MDI) within a single main window.

   - `JDialog`: A top-level window with a title and decorations that can be used to pop up an alert box or dialog box.

   - `JEditorPane`: A text component that can display text with multiple fonts, colors, and styles.

   - `JFileChooser`: A component that brings up a dialog that displays a file system tree.

   - `JFormattedTextField`: A text field that can format the text being edited.

   - `JInternalFrame`: A frame that represents an internal window of a desktop application.

   - `JLabel`: A display area for a short text string or an image.

   - `JLayeredPane`: A specialized pane that allows for the layering of components.

   - `JList`: A component that displays a list of objects.

   - `JMenu`: A pull-down menu component.

   - `JMenuBar`: A menu bar that can be added to a frame.

   - `JMenuItem`: An item in a menu, either a pull-down menu or a popup menu.

   - `JOptionPane`: A pane that pops up a standard dialog box that prompts users for a value or informs them of something.

   - `JPanel`: A generic container for organizing components.

   - `JPasswordField`: A text field specialized for password entry.

   - `JPopupMenu`: A popup menu that can be dynamically popped up at a specified position within a component.

   - `JProgressBar`: A component that visually displays the progress of some task.

   - `JRadioButton`: A radio button that can be selected or deselected.

   - `JRadioButtonMenuItem`: A menu item that can be selected or deselected.

   - `JRootPane`: A lightweight container used behind the scenes by `JFrame`, `JDialog`, and `JApplet`.

   - `JScrollPane`: A scroll pane that allows a user to scroll a component that is larger than the viewable area.

   - `JSeparator`: A component used to separate visual elements within a container.

   - `JSlider`: A component that lets the user graphically select a value by sliding a knob within a bounded interval.

   - `JSpinner`: A single line input field that lets the user select a number or an object value from an ordered sequence.

   - `JSplitPane`: A container that presents two components, divided by a movable divider.

   - `JTabbedPane`: A component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.

   - `JTable`: A component that displays data in a tabular format.

   - `JTextArea`: A multi-line area that displays plain text.

   - `JTextField`: A single-line text input field.

   - `JTextPane`: A text component that can display styled text using multiple fonts, colors, and styles.

   - `JToggleButton`: A two-state button that can be selected or deselected.

   - `JToolBar`: A component that can hold buttons or other components that are commonly used in an application.

   - `JToolTip`: A component that can display a small piece of information, such as a description of a toolbar button or menu item, when the user rests the pointer on the component.

   - `JTree`: A component that displays a hierarchical set of data.

   - `JViewport`: A component that is used to view a portion of a larger component.

   

2. **Interfaces**:

   - `ButtonModel`: Provides information about the selection state of a button component.

   - `ComboBoxModel`: Provides the data model for a `JComboBox`.

   - `Icon`: Interface for painting icons on components.

   - `ListCellRenderer`: Interface for rendering custom list cell content.

   - `MenuElement`: Interface for menu elements that can be added to menus.

   - `Scrollable`: Interface for components that can dynamically adjust their preferred size based on available space.

   - `SpinnerModel`: Interface for models that define the behavior of spinners

Comments

Popular posts from this blog

Collection Framework of Java

What is DBMS ?

Compiler vs Interpreter vs JIT Compiler