Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Why not using javax.swing.event with swing?

Reply
Thread Tools

Why not using javax.swing.event with swing?

 
 
S.T
Guest
Posts: n/a
 
      05-24-2007

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.

 
Reply With Quote
 
 
 
 
Joshua Cranmer
Guest
Posts: n/a
 
      05-24-2007
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.
 
Reply With Quote
 
 
 
 
S.T
Guest
Posts: n/a
 
      05-25-2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why :: ? Why not : ? Why not . ? <- less clutter ?!? Skybuck Flying C++ 16 08-25-2007 09:48 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why why why does function not work Horace Nunley ASP .Net 1 09-27-2006 09:52 PM
Cisco 2611 and Cisco 1721 : Why , why , why ????? sam@nospam.org Cisco 10 05-01-2005 08:49 AM



Advertisments