• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible Error In The O'Reilly Swing Book? Check p. 204 On JComboBox Re ActionEvent

Bob Nedwor
Ranch Hand
Posts: 215
Eclipse IDE Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the 2nd Edition (print Date = [1/05]).

Right in the center of p. 204, the author says:
"The ActionEvent is fired when the user explicitly makes a selection; it is coupled with the actionCommand property."

Help Ranchers, but am I reading into this? To me this is grossly misleading because it implies that the ActionEvent canNOT be progamatically fired. But this is simply not the case, which I found the hard way because I had another place in my code where I was calling the removeAllItems() method, on this JComboBox, which also causes the event to fire (same with the removeAllElements() method of DefaultComboBoxModel).

I could not find anything in the book's errata section. I am seriously considering submitting my own errata on this, but I wanted to get the thoughts of any JComboBox-savy ranchers first.

Thanks for your opinion.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic