How do I synchronize different radio buttons, on different windows, that means the same. Like:
Window A
(main): radioButtonA1
, radioButtonA2
(both in radioGroupA
)
Window B
(popup): radioButtonB1
, radioButtonB2
(both in radioGroupB
)
...where radioButtonA1
means the same that radioButtonB1
, and radioButtonA2
means the same that radioButtonB2
(like of they were mirrored).
When I change the radio selections via itemStateChanged
, I want also to synchronize the selection display. So if I change the selection in radioGroupA
to radioButtonA2
, I want that radioGroupB
also changes it selection to radioButtonB2
(as they mean the same).
But I want that the event itemStateChanged
on both radio buttons be called only once. If I tell radioButtonA2
itemStateChanged
event to also adjust the selection of radioGroupB
to radioButtonB2
, then the radioButtonB2
itemStateChanged
event will also be fired (or vice-versa), and I don't want that.
Independent, if I pressed radioButtonA2
or radioButtonB2
, I want the display to be synchronized and then call the method i wrote to deal with the change. But only once, not twice. Any help?