• Post Reply Bookmark Topic Watch Topic
  • New Topic

ChangeListener, ActionListener, ItemListener (Swing)  RSS feed

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between a ButtonModel.ChangeListener, ActionListener, and, ItemListener?



Related articles
1. ButtonModel
2. Event firing sequence and sample code
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a specific question about them? They're all documented, after all.

rc
 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ralph Cook wrote:Do you have a specific question about them? They're all documented, after all.

rc



Yes,

Do you usually use either of them to code events for say, button clicks and mouse events?
Are there any advantages of using anyone in particular?

Would you use Swing (simplified) as opposed to AWT? Why?

Would you use an IDE such as NetBeans, or JBuilder (which is the one you suggest?), rather than hand-coding them? Why? Why not?

Which IDE do you think is most user friendly for developing cloud applications? Would that use Java EE?
 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are appropriate times for using each of the listeners you've listed. They each serve a specific purpose and are not simply differently named functions providing the same capability as your question implies. Read their documentation and review the examples for each for a better understanding of them. My designs typically use ActionListeners.

I'm not sure what you mean by "Swing (simplified)," but Swing is an extension of AWT, providing more power and flexibility in GUI design, so it is preferred.

Yes, I would use an IDE, but No, I personally would not use a GUI to build my GUI designs. Using code generators requires the programmer to relinquish some degree of code control, understanding, reuse, ease of modification, and maintainability, and I'm not comfortable giving those up.

The debate/discussion of "Which IDE is best" has been forbidden on this forum by (I think) Ralph Cook. Try them and decide which one you prefer yourself.
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Brannon wrote:The debate/discussion of "Which IDE is best" has been forbidden on this forum by (I think) Ralph Cook. Try them and decide which one you prefer yourself.


I hope that was a joke! I don't have the standing to forbid anything here. And I might think most such discussions a waste of time, but if I ever gave anyone the impression I was trying to forbid it, I apologize.

I would even be interested in a discussion of IDEs on their merits, but most of them quickly become "I like this" and "I'm used to that", just like discussions of programming languages, operating systems, text editors, and sports teams. And there's nothing wrong with liking some features more than others, or being used to some things more than others, it is just very limited help for anyone else evaluating it.

As for using one, I am glad I am familiar with development using a windows command line and notepad, because when things like classpath come up I have a basic understanding of the environment and which things are eclipse and which things are java runtime. But I'm equally glad I don't have to develop with just those tools.

rc
 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wasn't a joke, but attribution may have been incorrect. I'm thinking it was either you or Campbell who said, in effect, threads debating IDE preferences were no longer welcome. I'll try to find it.

After a search:

Darn it! Neither of you were involved, and I'm not that familiar with those who were: Uncle!. I apologize to all.

And I agree, IDE discussions that compare their relative merits in particular applications can be useful. Unfortunately, they typically don't stay within those bounds.
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I don't remember saying that. The link you quoted didn't say "don't discuss that question," so much as, "look at the old discussion."

There is no point in discussing something twice if you can find the previous discussion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!