![]() |
Why not using javax.swing.event with swing?
Hi! Getting warm with Java this week, I have learned that the usage of Swing is highly recommended. I have seen many examples up to now, most of them actually preferring Swing. However, I wonder why all of them implement the old-fashioned (is it really?) AWT-only eventListener. Why is this? Is something wrong with javax.swing.event ? Sincerly, S.T. |
Re: Why not using javax.swing.event with swing?
S.T wrote:
> Hi! > > Getting warm with Java this week, I have learned that the usage of > Swing is highly recommended. I have seen many examples up to now, most > of them actually preferring Swing. However, I wonder why all of them > implement the old-fashioned (is it really?) AWT-only eventListener. > Why is this? Is something wrong with javax.swing.event ? > > Sincerly, > > S.T. > Look at the classes in javax.swing.event... How many of them implement basic functionality like MouseMove, etc.? Zero. The events in javax.swing.event are those that are specific to Swing, like JTables or JLists; the most commonly needed events are stored in java.awt.event. Besides, the java.awt.event is NOT AWT-only; all Swing components are really AWT components, so there was no sense in duplicating an entire event hierarchy because of the addition of Swing. |
Re: Why not using javax.swing.event with swing?
Dear Joshua,
thank you very much for your precise answer. Now the usage of AWT eventListeners with Swing makes sense to me. Sincerly S.T. |
| All times are GMT. The time now is 05:07 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.