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?

A

ss

19
Q

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

A

ss

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?

A

ss

22
Q

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

A

ss

23
Q

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

A

ss

24
Q

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

A

ss

25
Q

What is the difference between JTextArea: append() and JTextArea: setText()?

A

ss

26
Q
What does 20 mean in
new JTextField(20);
A

ss

27
Q

What method arguments does JTextField: getText() method have?

A

ss

28
Q

What type is the method argument of the JTextField: setText() method?

A

ss

29
Q

What type is the method argument of the JTextField: setEnabled() method?

A

ss

30
Q

How do we specify the initial value in JTextField?

A

ss

31
Q

What does a layout manager do to what things within what other thing?

A

ss

32
Q

In what pattern does LayoutManager: FlowLayout make the components appear, and in what order?

A

ss

33
Q

Name three alignment modes for FlowLayout.

A

ss

34
Q

In what pattern does LayoutManager: GridLayout make the components appear, and in what order?

A

ss

35
Q

How many positions does LayoutManager: BorderLayout have, and what are their names?

A

ss

36
Q

How do we link a listener object to an event source object?

A

ss

37
Q

How many method bodies are contained in the ActionListener interface?

A

ss

38
Q

What type of method argument does actionPerformed() method take?

A

ss

39
Q

What does JPanel contain?

A

ss

40
Q

How do we use the JScrollPane class?

A

ss

41
Q

If A implements B, does A have definitions of the methods in B, or vice versa?

A

ss

42
Q

What does AWT stand for? Which is newer AWT or Swing?

A

ss

43
Q

What is the return type of currentTimeMillis() method?

A

A long type.