Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > importing package

Reply
Thread Tools

importing package

 
 
frank
Guest
Posts: n/a
 
      12-10-2006
hai in our program we include java.awt.* package to use the components.
if we import this package,all the properties can used to our
program.then why
we import the java.awt.event.*?(when we use the java.awt package the
event class proprties also imported(?)

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      12-10-2006
frank wrote:
> hai in our program we include java.awt.* package to use the components.
> if we import this package,all the properties can used to our
> program.then why
> we import the java.awt.event.*?(when we use the java.awt package the
> event class proprties also imported(?)


Packages are not hierarchical.

/import java.awt.*/ only imports all the classes in /java.awt/, not the
packages. So /java.awt.client.*/ classes are not imported unless you also
import that package explicitly.

- Lew
 
Reply With Quote
 
 
 
 
frank
Guest
Posts: n/a
 
      12-11-2006
thank you friend for your information

 
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
importing for package Javabean Java 4 03-02-2006 12:05 AM
Importing Package through Jar in JCreator Parameter Names problem Alex Java 0 02-20-2006 05:19 AM
How to keep a module with the same name as a module it is importing from importing itself? plb Python 2 02-08-2005 03:14 PM
Importing a package and looping through modules in the package Dave Python 2 02-10-2004 08:14 PM
importing classs without package in JSP ? mhk Java 1 11-28-2003 11:46 PM



Advertisments