This textbook is available atAmazon.com Logo
Java Programming 9th Edition

Java Programming (9th Edition)

Book Edition9th Edition
Author(s)Farrell
ISBN9781337397070
PublisherCengage
SubjectComputer Science
Understanding Swing Components
TWO TRUTHS & A LIE
Using the JFrame Class
TWO TRUTHS & A LIE
Using the JLabel Class
TWO TRUTHS & A LIE
Using a Layout Manager
TWO TRUTHS & A LIE
Extending the JFrame Class
TWO TRUTHS & A LIE
Adding JTextFields and JButtons to a JFrame
TWO TRUTHS & A LIE
Learning About Event-Driven Programming
TWO TRUTHS & A LIE
Understanding Swing Event Listeners
TWO TRUTHS & A LIE
Using the JCheckBox, ButtonGroup, and JComboBox Classes
TWO TRUTHS & A LIE
Chapter 14, Understanding Swing Components, TWO TRUTHS & A LIE, Exercise 01
Page 700

1. Swing components are elements such as buttons; you usually can recognize their names because they contain the word Swing.

 

2. Each Swing component is a descendant of JComponent, which in turn inherits from the java.awt.Container class.

 

3. You insert the import statement import javax.swing.*; at the beginning of your Java program files so you can use Swing components.

Answer

  1. false --> The elements doesn't contain any word like swing, for example --> JButton, JFrame
  2. true
  3. true
Did you like this example?
Subscribe for full access
Page 700