United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7125456 [macosx] Programmatically selecting List item triggers an ItemEvent
7125456 : [macosx] Programmatically selecting List item triggers an ItemEvent

Details
Type:
Bug
Submit Date:
2011-12-28
Status:
Closed
Updated Date:
2012-04-10
Project Name:
JDK
Resolved Date:
2012-02-14
Component:
client-libs
OS:
os_x
Sub-Component:
java.awt
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u4

Related Reports

Sub Tasks

Description
Run the attached small example. It creates a java.awt.List and selects an item (two items, in fact, but it doesn't matter) programmatically via list.select(index). 
You will see in the log an ItemEvent with ITEM_STATE_CHANGED type. Well, 2 events but it doesn't matter either.

Spec says: Programmatically calling this method will _not_ trigger an ItemEvent.

                                    

Comments
EVALUATION

we should skip generating of the event when selection is programmatically changed
                                     
2012-01-16



Hardware and Software, Engineered to Work Together