JDK-8296222 : SwingEventMonitor - installListeners(Component , int ) - CELLEDITOR - bug
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.accessibility
  • Affected Version: 6,11,17,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-10-21
  • Updated: 2022-11-17
  • Resolved: 2022-11-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 20
20 masterFixed
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
When adding a CellEditorListener via SwingEventMonitor.addCellEditorListener, the method never succeedes. This is happening because there is a typo inside function installListeners(Component, int), on case EventID.CELLEDITOR.

//  Look for components which support the getCellEditor method
                //  (e.g. JTable, JTree)
                //
                try {
                    getCellEditorMethod = c.getClass().getMethod(
                        "getCellEditorMethod", nullClass);

Instead of "getCellEditorMethod", the method searched for should have only been "getCellEditor".
The consequence is that targets like JTables and JTrees are never found.

-> It looks like it was never tested :)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Add a cellEditorListener via SwingEventMonitor to listen to the editor of a JTable.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Listener methods "editingStoped" and "editingCanceled" are called when such actions happen.
ACTUAL -
Nothing happens.

FREQUENCY : always



Comments
Changeset: 5795c760 Author: Abhishek Kumar <abhiscxk@openjdk.org> Committer: Jayathirth D V <jdv@openjdk.org> Date: 2022-11-17 07:17:03 +0000 URL: https://git.openjdk.org/jdk/commit/5795c760db5bbfd7ff3b56a0c6236827526df70a
17-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11082 Date: 2022-11-10 08:01:38 +0000
10-11-2022

SwingEventMonitor belongs to jdk.accessibilty package not java_desktop, I guess not under client-libs, so this bug needs to be moved to appropriate project but am not sure myself which one...
03-11-2022

Duplicate of JDK-6788481
02-11-2022