Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java.awt.event.*

 
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.
 
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.


 
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).]
 
    Bookmark Topic Watch Topic
  • New Topic