26.07.2013 Views

Java How to Program Fourth Edition - DCC

Java How to Program Fourth Edition - DCC

Java How to Program Fourth Edition - DCC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 12 Graphical User Interface Components: Part 1 713<br />

• LayoutManager method layoutContainer recalculates the layout of its Container argument.<br />

• The GridLayout layout manager divides the container in<strong>to</strong> a grid of rows and columns. Components<br />

are added <strong>to</strong> a GridLayout starting at the <strong>to</strong>p-left cell and proceeding from left <strong>to</strong> right until<br />

the row is full. Then the process continues from left <strong>to</strong> right on the next row of the grid, and so on.<br />

• Container method validate recomputes the container’s layout based on the current layout<br />

manager for the Container and the current set of displayed GUI components.<br />

• Panels are created with class JPanel, which inherits from class JComponent. JPanels may have<br />

components, including other panels, added <strong>to</strong> them.<br />

TERMINOLOGY<br />

.gif file name extension dispatch an event<br />

.jpg file name extension dragging<br />

“listen” for an event drop-down list<br />

Abstract Windowing Toolkit event<br />

AbstractBut<strong>to</strong>n class event driven<br />

ActionEvent class event handler<br />

ActionListener interface event ID<br />

actionPerformed method event listener<br />

adapter class event-listener interface<br />

add method of But<strong>to</strong>nGroup EventListenerList class<br />

add method of class Container EventObject class<br />

addItemListener method FlowLayout class<br />

addKeyListener method FlowLayout.CENTER<br />

addListSelectionListener method FlowLayout.LEFT<br />

addMouseListener method FlowLayout.RIGHT<br />

addMouseMotionListener method focus<br />

assistive technologies FocusAdapter class<br />

BorderLayout class FocusListener interface<br />

BorderLayout.CENTER Font.BOLD<br />

BorderLayout.EAST Font.ITALIC<br />

BorderLayout.NORTH Font.PLAIN<br />

BorderLayout.SOUTH getActionCommand method<br />

BorderLayout.WEST getClickCount method<br />

but<strong>to</strong>n getIcon method<br />

but<strong>to</strong>n label getKeyChar method of KeyEvent<br />

But<strong>to</strong>nGroup class getKeyCode method of KeyEvent<br />

centered getKeyModifiersText method<br />

check box getKeyText method of KeyEvent<br />

check box label getModifiers method of InputEvent<br />

command but<strong>to</strong>n getPassword method of JPasswordField<br />

Component class getSelectedIndex method of JComboBox<br />

ComponentAdapter class getSelectedIndex method of JList<br />

ComponentListener interface getSelectedValues method of JList<br />

Container class getSource method of ActionEvent<br />

ContainerAdapter class getStateChange method of ItemEvent<br />

ContainerListener interface getText method of JLabel<br />

control getX method of MouseEvent<br />

delegation event model getY method of MouseEvent<br />

© Copyright 1992–2002 by Deitel & Associates, Inc. All Rights Reserved. 7/7/01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!