Action, Key, and Item Events

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Flashcards focused on Java Swing Action, Key, and Item Events, including corresponding event classes, listener methods, and GUI components.

Last updated 9:32 AM on 8/26/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

ActionEvent Class

An event class generated when a button is clicked or an item of a list is double-clicked.

2
New cards

actionPerformed(ActionEvent e)

An ActionListener method invoked when an action occurs.

3
New cards

KeyEvent Class

An event class indicating a keystroke occurred, passed to registered KeyListener or KeyAdapter objects as a low-level event by a Swing component.

4
New cards

keyTyped(KeyEvent evt)

A KeyListener method generated when a Unicode character is entered, which does not depend on platform or keyboard layout.

5
New cards

ASCII

Character set represented by 282^8 combinations.

6
New cards

UNICODE

Character set represented by 2162^{16} combinations.

7
New cards

getKeyChar()

A method that returns a valid Unicode character reported by KEY_TYPED events.

8
New cards

getKeyCode()

A method that returns the event's keycode based on a specific keyboard layout for KEY_PRESSED and KEY_RELEASED events, returning VK_Undefined for key typed events.

9
New cards

getExtendedKeyCode()

A method used with many international keyboard layouts such as the smiley emoticon key.

10
New cards

Virtual key codes

Codes that report which keyboard key has been pressed rather than a specific character.

11
New cards

JCheckBox Class

A Swing component representing an item that can be selected or deselected to turn an option on or off.

12
New cards

JRadioButton Class

A Swing component used to let the user select one of a set of mutually exclusive options.

13
New cards

ButtonGroup

A helper class that groups radio buttons and manages the group's state so only one button in the group can be selected at a time.

14
New cards

JComboBox Class

A Swing component that combines a button or editable field and a drop-down list.

15
New cards

ItemEvent Class

An event passed to the ItemListener whenever the selected item in a list control (such as a list box or combo box) is changed.

16
New cards

getItem()

An ItemListener event handler method that returns the item that was selected or deselected.

17
New cards

getSource()

An ItemListener event handler method that returns the object on which the event occurred.

18
New cards

getStateChanged()

An ItemListener event handler method that returns either SELECTED or DESELECTED to indicate the state change.