Chapter 14 Flashcards
A JFrame is a descendent of
Component, container, and window classes
Unlike a window, a JFrame
Has a title bar and border
The statement JFrmae myFrame = new JFrame(); creates a JFrame that is
Invisible and has no title
You can set a JFrame named aFrame 300x200 pixels with
JFrame aFrame = new JFrame(300x200)l, aFrame.setSize(300x200); and aFrame.setBounds(300, 200);
When a user closes a JFrame, the default behavior is for
the JFrame to be hidden and the application to keep running
An advantage of extending the JFrame class is
You can set the child class properties within the class constructor
YOu can add a JLabel to a JFrame with
Frame1.add(label1);
The arguments required by the Font constructor include
Typeface, style, and point size
A class that controls component positioning in a JFrame is a
Layout manager
What can a user type text data into, its data can be set in the program instead of by the user, and a program can set its attributes so that a user cannot type in it
A JTextField
A parameter can be used in some JFrame constructors to set the
Initial text in the field
Within an event-driven program, a component on which an event is generated is the
Source
A class that will respond to button press events must use
Implements ActionListener in its header
Button1.addActionListener(this);
Will execute an actionPerformed() method when button1 is clicked
When you use the getSource() method with an ActionEvent object, the result is an
Object