Java.awt Reference

Transcription

19java.awt owablejava.lang.ErrorDescriptionAn AWTError; thrown to indicate a serious runtime error.Class Definitionpublic class java.awt.AWTErrorextends java.lang.Error {// Constructorspublic AWTError (String message);}53610 July 2002 22:24java.awt.AWTError

AWTEVENT537ConstructorsAWTErrorpublic AWTError (String message)ParametersDetail messagemessageSee AlsoError, String19.2AWTEventjava.lang.Object a.awt.event.TextEventDescriptionThe root class of all AWT events. Subclasses of this class are the replacement forjava.awt.Event, which is only used for the Java 1.0.2 event model. In Java 1.1,event objects are passed from event source components to objects implementing acorresponding listener interface. Some event sources have a corresponding interface, too. For example, AdjustmentEvents are passed from Adjustable objectsto AdjustmentListeners. Some event types do not have corresponding interfaces; for example, ActionEvents are passed from Buttons to ActionListeners, but there is no “Actionable” interface that Button implements.Class Definitionpublic abstract class java.awt.AWTEventextends java.util.EventObject {// Constantspublic final static long ACTION EVENT MASK;public final static long ADJUSTMENT EVENT MASK;public final static long COMPONENT EVENT MASK;10 July 2002 22:24

CONTAINER EVENT MASK;FOCUS EVENT MASK;ITEM EVENT MASK;KEY EVENT MASK;MOUSE EVENT MASK;MOUSE MOTION EVENT MASK;RESERVED ID MAX;TEXT EVENT MASK;WINDOW EVENT MASK;// Variablesprotected boolean consumed;protected int id;// Constructorspublic AWTEvent (Event event);public AWTEvent (Object source, int id);// Instance Methodspublic int getID();public String paramString();public String toString();// Protected Instance Methodsprotected void consume();protected boolean isConsumed();}ConstantsACTION EVENT MASKpublic static final long ACTION EVENT MASKThe mask for action events.ADJUSTMENT EVENT MASKpublic static final long ADJUSTMENT EVENT MASKThe mask for adjustment events.COMPONENT EVENT MASKpublic static final long COMPONENT EVENT MASKThe mask for component events.10 July 2002 22:24

AWTEVENTCONTAINER EVENT MASKpublic static final long CONTAINER EVENT MASKThe mask for container events.FOCUS EVENT MASKpublic static final long FOCUS EVENT MASKThe mask for focus events.ITEM EVENT MASKpublic static final long ITEM EVENT MASKThe mask for item events.KEY EVENT MASKpublic static final long KEY EVENT MASKThe mask for key events.MOUSE EVENT MASKpublic static final long MOUSE EVENT MASKThe mask for mouse events.MOUSE MOTION EVENT MASKpublic static final long MOUSE MOTION EVENT MASKThe mask for mouse motion events.RESERVED ID MAXpublic static final intThe maximum reserved event id.TEXT EVENT MASKpublic static final long TEXT EVENT MASKThe mask for text events.WINDOW EVENT MASKpublic static final long WINDOW EVENT MASKThe mask for window events.10 July 2002 22:24539

540AWTEVENTVariablesconsumedprotected boolean consumedIf consumed is true, the event will not be sent back to the peer. Semanticevents will never be sent back to a peer; thus consumed is always true forsemantic events.idprotected int idThe type ID of this event.ConstructorsAWTEventpublic AWTEvent (Event event)ParametersDescriptioneventA version 1.0.2 java.awt.Event object.Constructs a 1.1 java.awt.AWTEvent derived from a 1.0.2java.awt.Event object.public AWTEvent (Object source, int id)ParametersDescriptionsourceThe object that the event originated from.idAn event type ID.Constructs an AWTEvent object.Instance MethodsgetIDpublic int getID()ReturnsThe type ID of the event.paramStringpublic String paramString()ReturnsDescription10 July 2002 22:24A string with the current settings of AWTEvent.Helper method for toString() that generates a string of current settings.

AWTEVENTMULTICASTER541toStringpublic String toString()ReturnsOverridesA string representation of the AWTEvent object.Object.toString()Protected Instance Methodsconsumeprotected void consume()DescriptionConsumes the event so it is not sent back to its source.isConsumedpublic boolean isConsumed()ReturnsA flag indicating whether this event has been consumed.See AlsoActionEvent, AdjustmentEvent, ComponentEvent, Event, EventObject,FocusEvent, ItemEvent, KeyEvent, MouseEvent, WindowEvent19.3AWTEventMulticaster DescriptionThis class multicasts events to event listeners. Each multicaster has two listeners,cunningly named a and b. When an event source calls one of the listener methodsof the multicaster, the multicaster calls the same listener method on both a and b.Multicasters are built into trees using the static add() and remove() methods. Inthis way a single event can be sent to many listeners.Static methods make it easy to implement event multicasting in component subclasses. Each time an add type Listener() function is called in the componentsubclass, call the corresponding AWTEventMulticaster.add() method to chaintogether (or “tree up”) listeners. Similarly, when a remove type Listener()function is called, AWTEventMulticaster.remove() can be called to remove achained listener.Class Definitionpublic class java.awt.AWTEventMulticasterextends java.lang.Objectimplements java.awt.event.ActionListener, omponentListener, cusListener, ener, java.awt.event.MouseListener,10 July 2002 22:24

event.MouseMotionListener, istener {// Variablesprotected EventListener a;protected EventListener b;// Constructorsprotected AWTEventMulticaster(EventListener a, EventListener b);// Class Methodspublic static ActionListener add(ActionListener a, ActionListener b);public static AdjustmentListener add(AdjustmentListener a,AdjustmentListener b);public static ComponentListener add(ComponentListener a,ComponentListener b);public static ContainerListener add(ContainerListener a,ContainerListener b);public static FocusListener add(FocusListener a, FocusListener b);public static ItemListener add(ItemListener a, ItemListener b);public static KeyListener add(KeyListener a, KeyListener b);public static MouseListener add(MouseListener a, MouseListener b);public static MouseMotionListener add(MouseMotionListener a,MouseMotionListener b);10 July 2002 22:24

AWTEVENTMULTICASTER543public static TextListener add(TextListener a, TextListener b);public static WindowListener add(WindowListener a, WindowListener b);protected static EventListener addInternal(EventListener a, EventListener b);public static ActionListener remove(ActionListener l, ActionListener oldl);public static AdjustmentListener remove(AdjustmentListener l,AdjustmentListener oldl);public static ComponentListener remove(ComponentListener l,ComponentListener oldl);public static ContainerListener remove(ContainerListener l,ContainerListener oldl);public static FocusListener remove(FocusListener l, FocusListener oldl);public static ItemListener remove(ItemListener l, ItemListener oldl);public static KeyListener remove(KeyListener l, KeyListener oldl);public static MouseListener remove(MouseListener l, MouseListener oldl);public static MouseMotionListener remove(MouseMotionListener l,MouseMotionListener oldl);public static TextListener remove(TextListener l, TextListener oldl);public static WindowListener remove(WindowListener l, WindowListener;protected static EventListener removeInternal(EventListener l,EventListener oldl);// Instancepublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic voidpublic void10 July 2002 22:24MethodsactionPerformed(ActionEvent e);adjustmentValueChanged(AdjustmentEvent e);componentAdded(ContainerEvent e);componentHidden(ComponentEvent e);componentMoved(ComponentEvent e);componentRemoved(ContainerEvent e);componentResized(ComponentEvent e);componentShown(ComponentEvent e);focusGained(FocusEvent e);focusLost(FocusEvent e);itemStateChanged(ItemEvent e);keyPressed(KeyEvent e);keyReleased(KeyEvent e);keyTyped(KeyEvent e);mouseClicked(MouseEvent e);mouseDragged(MouseEvent e);mouseEntered(MouseEvent e);mouseExited(MouseEvent e);mouseMoved(MouseEvent e);mousePressed(MouseEvent e);mouseReleased(MouseEvent e);textValueChanged(TextEvent e);windowActivated(WindowEvent e);windowClosed(WindowEvent e);windowClosing(WindowEvent e);windowDeactivated(WindowEvent e);windowDeiconified(WindowEvent e);

544AWTEVENTMULTICASTERpublic void windowIconified(WindowEvent e);public void windowOpened(WindowEvent e);// Protected Instance Methodsprotected EventListener remove(EventListener oldl);protected void saveInternal(ObjectOutputStream s, String k) throws IOException;}Variablesaprotected EventListener aOne of the EventListeners this AWTEventMulticaster sends events to.bprotected EventListener bOne of the EventListeners this AWTEventMulticaster sends events to.ConstructorsAWTEventMulticasterprotected AWTEventMulticaster (EventListener a,EventListener b)ParametersDescriptionaA listener that receives events.bA listener that receives events.Constructs an AWTEventMulticaster that sends events itreceives to the supplied listeners. The constructor is protectedbecause it is only the class methods of AWTEventMulticasterthat ever instantiate this class.Class Methodsaddpublic static ActionListener add (ActionListener a,ActionListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static AdjustmentListener add (AdjustmentListenera, AdjustmentListener b)Parameters10 July 2002 22:24aAn event listener.

AWTEVENTMULTICASTERReturnsbAn event listener.A listener object that passes events to a and b.public static ComponentListener add (ComponentListener a,ComponentListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static ContainerListener add (ContainerListener a,ContainerListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static FocusListener add (FocusListener a,FocusListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static ItemListener add (ItemListener a,ItemListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static KeyListener add (KeyListener a, KeyListenerb)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static MouseListener add (MouseListener a,MouseListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static MouseMotionListener add (MouseMotionListenera, MouseMotionListener b)10 July 2002 22:24545

546AWTEVENTMULTICASTERParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static TextListener add (TextListener a,TextListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.public static WindowListener add (WindowListener a,WindowListener b)ParametersReturnsaAn event listener.bAn event listener.A listener object that passes events to a and b.addInternalpublic static EventListener addInternal (EventListener a,EventListener b)ParametersReturnsDescriptionaAn event listener.bAn event listener.A listener object that passes events to a and b.This method is a helper for the add() methods.removepublic static ActionListener remove (ActionListener l,ActionListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static AdjustmentListener remove(AdjustmentListener l, AdjustmentListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static ComponentListener remove (ComponentListenerl, ComponentListener oldl)Parameters10 July 2002 22:24lAn event listener.

AWTEVENTMULTICASTERReturnsoldlAn event listener.A listener object that multicasts to l but not oldl.public static ContainerListener remove (ContainerListenerl, ContainerListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static FocusListener remove (FocusListener l,FocusListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static ItemListener remove (ItemListener l,ItemListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static KeyListener remove (KeyListener l,KeyListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static MouseListener remove (MouseListener l,MouseListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static MouseMotionListener remove(MouseMotionListener l, MouseMotionListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static TextListener remove (TextListener l,TextListener oldl)10 July 2002 22:24547

548AWTEVENTMULTICASTERParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static WindowListener remove (WindowListener l,WindowListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.public static WindowListener remove (WindowListener l,WindowListener oldl)ParametersReturnslAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.removeInternalpublic static EventListener removeInternal (EventListenerl, EventListener oldl)ParametersReturnsDescriptionlAn event listener.oldlAn event listener.A listener object that multicasts to l but not oldl.This method is a helper for the remove() methods.Instance MethodsactionPerformedpublic void actionPerformed (ActionEvent e)ParametersDescriptioneThe action event that occurred.Handles the event by passing it on to listeners a and b.adjustmentValueChangedpublic void adjustmentValueChanged (AdjustmentEvent e)ParametersDescriptioneThe adjustment event that occurred.Handles the event by passing it on to listeners a and b.componentAdded10 July 2002 22:24

AWTEVENTMULTICASTERpublic void componentAdded (ContainerEvent e)ParametersDescriptioneThe container event that occurred.Handles the event by passing it on to listeners a and b.componentHiddenpublic void componentHidden (ComponentEvent e)ParametersDescriptioneThe component event that occurred.Handles the event by passing it on to listeners a and b.componentMovedpublic void componentMoved (ComponentEvent e)ParametersDescriptioneThe component event that occurred.Handles the event by passing it on to listeners a and b.componentRemovedpublic void componentRemoved (ContainerEvent e)ParametersDescriptioneThe container event that occurred.Handles the event by passing it on to listeners a and b.componentResizedpublic void componentResized (ComponentEvent e)ParametersDescriptioneThe component event that occurred.Handles the event by passing it on to listeners a and b.componentShownpublic void componentShown (ComponentEvent e)ParametersDescriptioneThe component event that occurred.Handles the event by passing it on to listeners a and b.focusGainedpublic void focusGained (FocusEvent e)ParametersDescription10 July 2002 22:24eThe focus event that occurred.Handles the event by passing it on to listeners a and b.549

550AWTEVENTMULTICASTERfocusLostpublic void focusLost (FocusEvent e)ParametersDescriptioneThe focus event that occurred.Handles the event by passing it on to listeners a and b.itemStateChangedpublic void itemStateChanged (ItemEvent e)ParametersDescriptioneThe item event that occurred.Handles the event by passing it on to listeners a and b.keyPressedpublic void keyPressed (KeyEvent e)ParametersDescriptioneThe key event that occurred.Handles the event by passing it on to listeners a and b.keyReleasedpublic void keyReleased (KeyEvent e)ParametersDescriptioneThe key event that occurred.Handles the event by passing it on to listeners a and b.keyTypedpublic void keyTyped (KeyEvent e)ParametersDescriptioneThe key event that occurred.Handles the event by passing it on to listeners a and b.mouseClickedpublic void mouseClicked (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.mouseDraggedpublic void mouseDragged (MouseEvent e)ParametersDescription10 July 2002 22:24eThe mouse event that occurred.Handles the event by passing it on to listeners a and b.

AWTEVENTMULTICASTERmouseEnteredpublic void mouseEntered (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.mouseExitedpublic void mouseExited (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.mouseMovedpublic void mouseMoved (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.mousePressedpublic void mousePressed (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.mouseReleasedpublic void mouseReleased (MouseEvent e)ParametersDescriptioneThe mouse event that occurred.Handles the event by passing it on to listeners a and b.textValueChangedpublic void textValueChanged (TextEvent e)ParametersDescriptioneThe text event that occurred.Handles the event by passing it on to listeners a and b.windowActivatedpublic void windowActivated (WindowEvent e)ParametersDescription10 July 2002 22:24eThe window event that occurred.Handles the event by passing it on to listeners a and b.551

552AWTEVENTMULTICASTERwindowClosedpublic void windowClosed (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.windowClosingpublic void windowClosing (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.windowDeactivatedpublic void windowDeactivated (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.windowDeiconifiedpublic void windowDeiconified (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.windowIconifiedpublic void windowIconified (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.windowOpenedpublic void windowOpened (WindowEvent e)ParametersDescriptioneThe window event that occurred.Handles the event by passing it on to listeners a and b.Protected Instance Methodsremoveprotected EventListener remove(EventListener oldl)ParametersReturns10 July 2002 22:24oldlThe listener to remove.The resulting EventListener.

AWTEXCEPTIONDescription553This method removes oldl from the AWTEventMulticasterand returns the resulting listener.See AlsoActionEvent, AdjustmentEvent, ComponentEvent, Event, EventListener,EventObject, FocusEvent, ItemEvent, KeyEvent, MouseEvent, onDescriptionAn AWTException; thrown to indicate an exceptional condition; must be caughtor declared in a throws clause.Class Definitionpublic class java.awt.AWTExceptionextends java.lang.Exception {// Constructorspublic AWTException (String message);}ConstructorsAWTExceptionpublic AWTException (String message)ParametersmessageSee AlsoException, String10 July 2002 22:24Detailed message.

554ADJUSTABLE19.5Adjustable e Adjustable inter face is useful for scrollbars, sliders, dials, and other components that have an adjustable numeric value. Classes that implement theAdjustable inter face should send AdjustmentEvent objects to listeners thathave registered via e Definitionpublic abstract interface java.awt.Adjustable {// Constantspublic final static int HORIZONTAL 0;public final static int VERTICAL 1;// Interface Methodspublic abstract void addAdjustmentListener (AdjustmentListener l);public abstract int getBlockIncrement();public abstract int getMaximum();public abstract int getMinimum();public abstract int getOrientation();public abstract int getUnitIncrement();public abstract int getValue();public abstract int getVisibleAmount();public abstract void removeAdjustmentListener (AdjustmentListener l);public abstract void setBlockIncrement (int b);public abstract void setMaximum (int max);public abstract void setMinimum (int min);public abstract void setUnitIncrement (int u);public abstract void setValue (int v);public abstract void setVisibleAmount (int v);}ConstantsHORIZONTAL10 July 2002 22:24

ADJUSTABLE555public static final int HORIZONTALA constant representing horizontal orientation.VERTICALpublic static final int VERTICALA constant representing vertical orientation.Interface MethodsaddAdjustmentListenerpublic abstract void addAdjustmentListener theAdjust-mentListener inter face.DescriptionAdd a listener for adjustment event.getBlockIncrementpublic abstract int getBlockIncrement()ReturnsThe amount to scroll when a paging area is selected.getMaximumpublic abstract int getMaximum()ReturnsThe maximum value that the Adjustable object can take.getMinimumpublic abstract int getMinimum()ReturnsThe minimum value that the Adjustable object can take.getOrientationpublic abstract int getOrientation()ReturnsA value representing the direction of the Adjustable object.getUnitIncrementpublic abstract int getUnitIncrement()Returns10 July 2002 22:24The unit amount to scroll.

556ADJUSTABLEgetValuepublic abstract int getValue()ReturnsThe current setting for the Adjustable object.getVisibleAmountpublic abstract int getVisibleAmount()ReturnsThe current visible setting (i.e., size) for the Adjustableobject.removeAdjustmentListenerpublic abstract void removeAdjustmentListener(AdjustmentListener l)ParametersDescriptionlOne of the object’s AdjustmentListeners.Remove an adjustment event listener.setBlockIncrementpublic abstract void setBlockIncrement (int b)ParametersDescriptionbNew block increment amount.Changes the block increment amount for the Adjustableobject.setMaximumpublic abstract void setMaximum (int max)ParametersDescriptionmaxNew maximum value.Changes the maximum value for the Adjustable object.setMinimumpublic abstract void setMinimum (int min)ParametersDescriptionminNew minimum value.Changes the minimum value for the Adjustable object.setUnitIncrementpublic abstract void setUnitIncrement (int u)ParametersDescription10 July 2002 22:24uNew unit increment amount.Changes the unit increment amount for the Adjustableobject.

BORDERLAYOUT557setValuepublic abstract void setValue (int v)ParametersDescriptionvNew value.Changes the current value of the Adjustable object.setVisibleAmountpublic abstract void setVisibleAmount (int v)ParametersDescriptionvNew amount visible.Changes the current visible amount of the Adjustable object.See AlsoAdjustmentEvent, AdjustmentListener, rLayoutjava.io.SerializableDescriptionBorderLayout is a LayoutManager that provides the means to lay out components along the edges of a container. It divides the container into five regions,named North, East, South, West, and Center. Normally you won’t call the LayoutManager’s methods yourself. When you add() a Component to a Container, theContainer calls the addLayoutComponent() method of its LayoutManager.Class Definitionpublic class java.awt.BorderLayoutextends java.lang.Objectimplements java.awt.LayoutManager2, java.io.Serializable {// Constantspublic finalpublic finalpublic finalpublic finalpublic final10 July 2002 ingStringStringCENTER; EAST; NORTH; SOUTH; WEST;

558BORDERLAYOUT// Constructorspublic BorderLayout();public BorderLayout (int hgap, int vgap);// Instance Methodspublic void addLayoutComponent (Component comp, Object constraints); public void addLayoutComponent (String name, Component component); public int getHgap(); public abstract float getLayoutAlignmentX(Container target); public abstract float getLayoutAlignmentY(Container target); public int getVgap(); public abstract void invalidateLayout(Container target); id layoutContainer (Container target);abstract Dimension maximumLayoutSize(Container target);Dimension minimumLayoutSize (Container target);Dimension preferredLayoutSize (Container target);void removeLayoutComponent (Component component);void setHgap (int hgap); void setVgap (int vgap); String toString();}ConstantsCENTERpublic final static String CENTERA constant representing center orientation.EASTpublic final static String EASTA constant representing east orientation.NORTHpublic final static String NORTHA constant representing north orientation.SOUTHpublic final static String SOUTHA constant representing south orientation.10 July 2002 22:24

BORDERLAYOUT559WESTpublic final static String WESTA constant representing west orientation.ConstructorsBorderLayoutpublic BorderLayout()DescriptionConstructs a BorderLayout object.public BorderLayout (int hgap, int vgap)ParametersDescriptionHorizontal space between each component inthe container.vgapVertical space between each component in thecontainer.Constructs a BorderLayout object with the values specified asthe gaps between each component in the container managedby this instance of BorderLayout.hgapInstance MethodsaddLayoutComponentpublic void addLayoutComponent (Component comp,Object constraints) ParameterscompconstraintsThe component being added.An object describing the constraints on this ayoutComponent()Adds the component comp to a container subject to the givenconstraints. This is a more general version of addLayoutComponent(String, Component) method. It corresponds tojava.awt.Container’s add(Component, Object) method.In practice, it is used the same in version 1.1 as in Java 1.0.2,except with the parameters swapped:Panel p new Panel(new BorderLayout());p.add(new Button(“OK”), BorderLayout.SOUTH);addLayoutComponent10 July 2002 22:24

560BORDERLAYOUTpublic void addLayoutComponent (String name,Component component) ParametersnamecomponentName of region to add component to.Actual component being Component()Adds a component to a container in region name. This hasbeen replaced in version 1.1 with the more general addLayoutComponent(Component, Object).getHgappublic int getHgap() ReturnsThe horizontal gap for this BorderLayout instance.getLayoutAlignmentXpublic abstract float getLayoutAlignmentX (Containertarget) ParametersReturnsDescriptiontargetThe container to inspect.The value .5 for all containers.This method returns the preferred alignment of the given container target. A return value of 0 is left aligned, .5 is centered, and 1 is right aligned.getLayoutAlignmentYpublic abstract float getLayoutAlignmentY (Containertarget) ParametersReturnsDescriptiontargetThe container to inspect.The value .5 for all containers.This method returns the preferred alignment of the given container target. A return value of 0 is top aligned, .5 is centered, and 1 is bottom aligned.getVgappublic int getVgap() Returns10 July 2002 22:24The vertical gap for this BorderLayout instance.

BORDERLAYOUT561invalidateLayoutpublic abstract void invalidateLayout (Container target) ParametersDescriptiontargetThe container to invalidate.Does nothing.layoutContainerpublic void layoutContainer (Container target)ParametersImplementsDescriptiontargetThe container that needs to be redrawn.LayoutManager.layoutContainer()Draws components contained within target.maximumLayoutSizepublic abstract Dimension maximumLayoutSize (Containertarget) ParametersDescriptionThe container to inspect.A Dimension whose horizontal and verticalcomponents are Integer.MAX VALUE.For BorderLayout, a maximal Dimension is always returned.targetReturnsminimumLayoutSizepublic Dimension minimumLayoutSize (Container tThe container whose size needs to be calculated.Minimum Dimension of the container target.LayoutManager.minimumLayoutSize()Calculates minimum size of target. container.preferredLayoutSizepublic Dimension preferredLayoutSize (Cont

Parameters event A version 1.0.2 java.awt.Eventobject. Description Constructs a 1.1java.awt.AWTEvent derived from a 1.0.2 java.awt.Eventobject. public AWTEvent (Object source, int id) Parameters source The object that the event originated from. id A