February 2014
Beginner
1248 pages
62h 25m
English
• There are three Swing state button types—JToggleButton (p. 498), JCheckBox (p. 498) and JRadioButton (p. 498).
• Classes JCheckBox and JRadioButton are subclasses of JToggleButton.
• Component method setFont (p. 500) sets the component’s font to a new Font object (p. 500) of package java.awt.
• Clicking a JCheckBox causes an ItemEvent (p. 501) that can be handled by an ItemListener (p. 501) which defines method itemStateChanged (p. 501). Method addItemListener registers the listener for the ItemEvent of a JCheckBox or JRadioButton object.
• JCheckBox method isSelected determines whether a JCheckBox is selected.
• JRadioButtons have two states—selected and not selected. Radio buttons (p. 495) normally ...
Read now
Unlock full access