CM Unit 3 Flashcards

1
Q

GUI

A

Graphical User Interface

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

Layout

A

Specifies how components will be added to the panel.

Examples: Flow Layout, Border Layout, Grid Layout.

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

Listener

A

Handles interface events through the action performed method.

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

Swing GUI Components

A

JButton
JLabel
JTextField

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

Double.parseDouble

A

Convert text to a double

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

Integer.parseInt

A

Convert text to an integer

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

Switch

A

Switch(x)
{
Case1: …break;
default;
}

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

JButton syntax and method and constructor

A

JButton Button = new JButton(“text”)
add ActionListener(new Listener());

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

JLabel syntax and method and constructor

A

JLabel label = new JLabel(“text”)
label.settext();

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

JTextFeild syntax and method and constructor

A

JTextField box = new JTextField(“Text”, width);
box.getText();

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

The Action Listener Interface and how to create listeners

A

Private Class Listener implements Action Listener
{
public void action performed(Action Event e)
{

}
}

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

Random number formula and other

A

Double D = Math.random() * Range of Values + Lowest

[0,6) is 6 numbers
[0,6] is 7 numbers.

Inclusive is hard bracket. Exclusive is soft bracket.

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