I recently encountered a bug in java where JList will fire the valueChanged() method twice when changing a value with the mouse, and only once when changing a value with the keyboard. I just found a bug regarding this on Oracle's website (apparently, the bug is more than twelve years old), and I'm wondering if anyone can explain to me why Oracle has decided that this isn't a defect (not to mention that getValueIsAdjusting() returns false when the keyboard is used).
For anyone having this issue, I found that simply checking for when getValueIsAdjusting()
is false, then running the rest of my method will get around the issue.