| Author |
Swing ChangeEvent occur twice
|
albert kao
Ranch Hand
Joined: Feb 04, 2010
Posts: 224
|
|
The existing source codes, which I try to debug, create the MyTabbedPane class from JTabbedPane.
Clicking the tab will generate the ChangeEvent twice inside the addChangeListener.
Why? Is that to make the ChangeEvent occur once only?
2011-10-11 09:02:00,211 DEBUG Langclient.modules.findPanel - addChangeListener index 1
2011-10-11 09:02:00,211 DEBUG Langclient.modules.findPanel - tabsCurrentIndex 1
2011-10-11 09:02:00,211 DEBUG Langclient.modules.findPanel - addChangeListener index 1
2011-10-11 09:02:00,227 DEBUG Langclient.modules.findPanel - tabsCurrentIndex 1
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Are you sure that you haven't added your change listeners twice? I created a little SSCCE and I only get one event.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Swing ChangeEvent occur twice
|
|
|