JComponents Flashcards

1
Q

All Swing components that start with J descend from the JComponent class except…

A

…JFrame, JDialog, JApplet

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

setToolTipText

A

Hover over component –> specified string is displayed in a small window that appears near the component

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

setBorder

A

Allows for setting the border displayed around its edges

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

Paint the inside of a component

A

Override the paintComponent method

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

ComponentUI

A

For JComponents, performs all the drawing, event handling, size determination, etc so JComponent is relative to the current look and feel
Set using UIManager.setLookandFeel method

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

putClientProperty and getClientProperty methods

A

Associating one or more properties with any JComponent

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

JComponent Support for Layout

A

setMinimumSize, setMaximumSize, setAlignmentX, and setAlignmentY

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

JComponent Support for Accessability

A

Provides API and basic functionality to help assistive technologies like screen readers getting information from Swing components

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

JComponent Support for Drag and Drop

A

Provides API to set a component’s transfer handler, which is the basis for Swing’s drag and drop support

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

Double Buffering

A

Smooths on-screen painting

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

Key Bindings

A

Makes components reach when the user presses a key on the keyboard

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

Swing text components

A
JTextField
JFormattedTextField
JPasswordField
JTextArea
JEditorPane
JTextPane
How well did you know this?
1
Not at all
2
3
4
5
Perfectly