Make a web site - Chapter 12 Graphical User Interface Components: Part 1
Monday, March 3rd, 2008Chapter 12 Graphical User Interface Components: Part 1 713 LayoutManagermethod layoutContainer recalculates the layout of its Container argument. The GridLayout layout manager divides the container into a grid of rows and columns. Components are added to a GridLayout starting at the top-left cell and proceeding from left to right until the row is full. Then the process continues from left to right on the next row of the grid, and so on. Container method validate recomputes the container s layout based on the current layout manager for the Container and the current set of displayed GUI components. Panels are created with class JPanel, which inherits from class JComponent. JPanels may have components, including other panels, added to them. TERMINOLOGY .giffile name extension dispatch an event .jpgfile name extension dragging listen for an event drop-down list Abstract Windowing Toolkit event AbstractButton class event driven ActionEvent class event handler ActionListener interface event ID actionPerformed method event listener adapter class event-listener interface add method of ButtonGroup EventListenerList class add method of class Container EventObject class addItemListener method FlowLayout class addKeyListenermethod FlowLayout.CENTER addListSelectionListenermethod FlowLayout.LEFT addMouseListenermethod FlowLayout.RIGHT addMouseMotionListenermethod focus assistive technologies FocusAdapter class BorderLayout class FocusListener interface BorderLayout.CENTER Font.BOLD BorderLayout.EAST Font.ITALIC BorderLayout.NORTH Font.PLAIN BorderLayout.SOUTH getActionCommandmethod BorderLayout.WEST getClickCountmethod button getIcon method button label getKeyChar method of KeyEvent ButtonGroup class getKeyCode method of KeyEvent centered getKeyModifiersText method check box getKeyText method of KeyEvent check box label getModifiers method of InputEvent command button getPassword method of JPasswordField Component class getSelectedIndex method of JComboBox ComponentAdapter class getSelectedIndex method of JList ComponentListener interface getSelectedValuesmethod of JList Container class getSourcemethod of ActionEvent ContainerAdapter class getStateChange method of ItemEvent ContainerListener interface getText method of JLabel control getX method of MouseEvent delegation event model getY method of MouseEvent Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/7/01