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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 13 Graphical User Interface Components: Part 2 799<br />

occupy additional space. Class Box also defines method createVerticalGlue for vertical<br />

BoxLayouts.<br />

• Box static method createRigidArea adds a rigid area <strong>to</strong> a container. A rigid area is an<br />

invisible GUI component that always has a fixed pixel width and height.<br />

• The BoxLayout construc<strong>to</strong>r receives a reference <strong>to</strong> the container for which it controls the layout<br />

and a constant indicating whether the layout is horizontal (BoxLayout.X_AXIS) or vertical<br />

(BoxLayout.Y_AXIS).<br />

• CardLayout methods first, previous, next and last are used <strong>to</strong> display a particular<br />

card. Method first displays the first card. Method previous displays the previous card.<br />

Method next displays the next card. Method last displays the last card.<br />

• To use GridBagLayout, a GridBagConstraints object must be used <strong>to</strong> specify how a<br />

component is placed in a GridBagLayout.<br />

• Method setConstraints of class GridBagLayout takes a Component argument and a<br />

GridBagConstraints argument and sets the constraints of the Component.<br />

TERMINOLOGY<br />

addSepara<strong>to</strong>r method of class JMenu GridBagConstraints class<br />

addWindowListener method of Window GridBagConstraints.BOTH<br />

anchor variable of GridBagConstraints GridBagConstraints.CENTER<br />

au<strong>to</strong>matic word wrap GridBagConstraints.EAST<br />

Box class GridBagConstraints.HORIZONTAL<br />

BoxLayout layout manager GridBagConstraints.NONE<br />

BoxLayout.X_AXIS GridBagConstraints.NORTH<br />

BoxLayout.Y_AXIS GridBagConstraints.NORTHEAST<br />

CardLayout layout manager GridBagConstraints.NORTHWEST<br />

ChangeEvent class GridBagConstraints.RELATIVE<br />

ChangeListener interface GridBagConstraints.REMAINDER<br />

child window GridBagConstraints.SOUTH<br />

command-line arguments GridBagConstraints.SOUTHEAST<br />

context-sensitive popup menu GridBagConstraints.SOUTHWEST<br />

createHorizontalBox method of Box GridBagConstraints.VERTICAL<br />

createHorizontalGlue method of Box GridBagConstraints.WEST<br />

createHorizontalStrut method of Box GridBagLayout layout manager<br />

createRigidArea method of Box gridheight variable<br />

createVerticalBox method of Box gridwidth variable<br />

createVerticalGlue method of Box gridx variable of GridBagConstraints<br />

createVerticalStrut method of Box gridy variable of GridBagConstraints<br />

dedicated drawing area isPopupTrigger method of MouseEvent<br />

Dimension class JCheckBoxMenuItem class<br />

dispose method of class Window JDesk<strong>to</strong>pPane class<br />

external event JInternalFrame class<br />

fill variable of GridBagConstraints JMenu class<br />

first method of CardLayout JMenuBar class<br />

getClassName method JMenuItem class<br />

getInstalledLookAndFeels method JPopupMenu class<br />

getMinimumSize method of Component JRadioBut<strong>to</strong>nMenuItem class<br />

getPreferredSize method of Component JSlider class<br />

getSelectedText method JTextArea class<br />

getValue method of class JSlider JTextComponent class

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

Saved successfully!

Ooh no, something went wrong!