On Mon, 18 Jul 2022 08:42:06 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> For a DefaultButtonModel, setMnemonic() generates a ChangeEvent even if the > new value is the same as the old value (that is, even if nothing has > changed). > Fix is to fire StateChange event only if the value has changed. > > This is consistent with other places like > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/colorchooser/DefaultColorSelectionModel.java#L103 > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/DefaultSingleSelectionModel.java#L79 > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/DefaultBoundedRangeModel.java#L309 Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.org/jdk/pull/9536
