Prelim Flashcards

(42 cards)

1
Q

A part of Java Foundation Classes (JFC) used to create window-based applications.

A

Java Swing

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

The Abstract Windows Toolkit, components are older and not as portable compared to newer frameworks.

A

AWT

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

The main window and top-level container where components like buttons, labels, and text fields are added.

A

JFrame

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

A container that can hold and organize a group of components.

A

JPanel

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

Provides a scrollable view of a component, useful for large datasets.

A

JScrollPane

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

A clickable button that triggers an action when clicked.

A

JButton

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

A display area for a short text string or image that is non-editable.

A

JLabel

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

A single-line text input field for user textual input.

A

JTextField

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

A multi-line text input area allowing greater text displays and user input.

A

JTextArea

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

an item in a menu

A

JMenuItem

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

A container to hold multiple menus, typically situated at the top of a window

A

JMenuBar

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

A drop-down menu that contains multiple menu items.

A

JMenu

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

An item in a menu that can have attached actions

A

JMenuItem

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

An interface used to receive action events typically from GUI components like buttons

A

ActionListener

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

A Swing component used to display messages in a pop-up dialog box

A

JOptionPane

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

Involves creating a JPanel to hold components and adding them to the JFrame

A

Adding Components

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

Makes a JFrame visible or hides it accordingly.

A

void setVisible(boolean)

18
Q

Sets the title of the JFrame, allowing identification of the window.

A

void.setTitle(String)

19
Q

Which layout manager is used if components are placed at specific positions using setBounds()?

20
Q

Defines what happens when the frame is close

A

void. setDefaultCloseOperation(JFrame.)

21
Q

Allows or disallows resizing of the frame

A

void. setResizable()

22
Q

Return’s a JFrame’s title

A

String. getTitle()

23
Q

Override the default behavior for the JFrame to be positioned in the upper-left corner of the computer screen’s desktop; the first two arguments are the horizontal and vertical positions of the JFrame’s upper-left corner to the desktop, and the final two arguments set the width and height

A

void. setBounds(int x, int y, witdth, height)

24
Q

Indicates that a Component-defined action occurred, like button clicks.

25
Returns the text from the single-line text field
getText()
26
set the text of the JTextArea
setText()
27
makes the JTextArea editable or read-only
setEditable()
28
29
A resizable array implementation of the List interface useful for storing records
ArrayList
30
Arranges GUI components within a container
Layout Manager
31
Places components in five areas: top, bottom, left, right, and center.
BorderLayout
32
It is the default layout manager for JFrame
BorderLayout
33
34
The default layout manager for JPanel that arranges components in a row.
JFlowLayout
35
Aligns components within a grid of cells allowing components to span multiple cells.
GridBagLayout
36
Classes designed to hold other components such as Panel, Frame, and Dialog.
Container class
37
A method to get the content pane that can hold the elements in a JFrame.
ContentPane
38
Like a pop-up window displaying information or messages.
Dialog
39
A pure container to organize the components on to a window
Panel
40
fully functioning window with it's title and icons
Frame
41
42
Which method is used to add a component (e.g., a button or label) to a JFrame?
add()