• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.awt.event.*

 
Archie Andrews
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Is it necessary to import java.awt.event.* if you have already imported java.awt.* ???
I had posted a discussion on my code not founding the WindowAdapter() class. Now when I imported java.awt.even.* it worked.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you do have to import java.awt.event.*;
because you are generating an event when you click on closing button.
thanks

Originally posted by Archie Andrews:
hi,
Is it necessary to import java.awt.event.* if you have already imported java.awt.* ???
I had posted a discussion on my code not founding the WindowAdapter() class. Now when I imported java.awt.even.* it worked.

 
Tom P
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The * in java.awt.* does not mean give me everything in that directory and all directories below it. It means give me all the classes in that directory. If you need the classes from the event directory then you must specify java.awt.event.*. Remember that you are importing a package. The event classes are not in the package called java.awt, they are in the package named java.awt.event.
[This message has been edited by Tom P (edited May 27, 2000).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic