13. Graphical user interfaces Flashcards

1
Q

If A extends B, do instances of A have the properties of those of B, plus more, or vice versa?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When does the main thread end? When does the virtual machine exit?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the GUI event thread usually spend most of its time doing?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does event driven programming differ from the style used in the main method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What sort of information is held in ActionEvent objects?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is returned by getSource() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of the Container class?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What argument is given to Container: add() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to we specify the constraint in the Container: add() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What kind of argument does Container: setLayout() have?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do we specify the label when we create a JButton?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What type is the parameter in the JButton: addActionListener() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What type is the method argument in JButton: setEnabled() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What type is the method argument in JButton: setText() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What part of a GUI does javax.swing.JFrame correspond to?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Where does the given title typically appear (when using JFrame: setTitle() method)?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the return type of the JFrame: getContentPane() method?

A

ss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What four choices do we have as arguments to the JFrame: setDefaultCloseOperation() method?

19
Q

When should JFrame: pack() method be called and what does it do?

20
Q

What type of argument is given to the JFrame: setVisible() method?

A

A boolean type

21
Q

What is the purpose of the JLabel class?

22
Q

What type is the method parameter in the JLabel: setText() method?

23
Q

What arguments can we give to the constructor when using JTextArea?

24
Q

What happens if the given String contains new line characters in the JTextArea: setText() method?

25
What is the difference between JTextArea: append() and JTextArea: setText()?
ss
26
``` What does 20 mean in new JTextField(20); ```
ss
27
What method arguments does JTextField: getText() method have?
ss
28
What type is the method argument of the JTextField: setText() method?
ss
29
What type is the method argument of the JTextField: setEnabled() method?
ss
30
How do we specify the initial value in JTextField?
ss
31
What does a layout manager do to what things within what other thing?
ss
32
In what pattern does LayoutManager: FlowLayout make the components appear, and in what order?
ss
33
Name three alignment modes for FlowLayout.
ss
34
In what pattern does LayoutManager: GridLayout make the components appear, and in what order?
ss
35
How many positions does LayoutManager: BorderLayout have, and what are their names?
ss
36
How do we link a listener object to an event source object?
ss
37
How many method bodies are contained in the ActionListener interface?
ss
38
What type of method argument does actionPerformed() method take?
ss
39
What does JPanel contain?
ss
40
How do we use the JScrollPane class?
ss
41
If A implements B, does A have definitions of the methods in B, or vice versa?
ss
42
What does AWT stand for? Which is newer AWT or Swing?
ss
43
What is the return type of currentTimeMillis() method?
A long type.