Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-15-2007, 07:05 PM
Member
 
Join Date: Nov 2007
Location: India
Posts: 4
ahdus is on a distinguished road
difference btwn java.awt.* and java.awt.event.*
does import java.awt.* doesn't import subpackages of awt????


while writing code for an applet

its written

import java.awt.*
import java.awt.event.*



doesn't the 1st stsement of code.......include second one too??
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-15-2007, 08:32 PM
ShoeNinja's Avatar
Senior Member
 
Join Date: Oct 2007
Posts: 123
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
Yes the first statement includes the second.

import java.awt.* imports everything in the under awt (including event and everything in it).
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-17-2007, 01:56 PM
Member
 
Join Date: Nov 2007
Location: India
Posts: 4
ahdus is on a distinguished road
then why do people write both of them in the code.......

???????
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-17-2007, 04:15 PM
Member
 
Join Date: Nov 2007
Posts: 1
satish_k2020@yahoo.com is on a distinguished road
the first statement does not include the second.import java.awt.*; this statement import all classes belongs to awt package only.does not import its subpackages.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-17-2007, 07:09 PM
Member
 
Join Date: Nov 2007
Location: India
Posts: 4
ahdus is on a distinguished road
which reply among the above 2 is correct??
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 11-17-2007, 08:07 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Last one should be correct as far as i know.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate an event to another java application i_berbeu Advanced Java 18 05-12-2008 03:57 PM
Difference between ASP and JSP barney JavaServer Pages (JSP) and JSTL 1 08-07-2007 09:15 AM
addActionListener(java.awt.event.ActionListener) in java.awt.Button cannot be applied mathias Java Applets 1 08-06-2007 10:49 AM
whats the difference between Java core,J2EE...... prince24 New To Java 2 07-11-2007 08:54 PM
JBoss and Java 6:Exception occurred during event dispatching Ed Advanced Java 2 07-04-2007 07:23 AM


All times are GMT +3. The time now is 09:26 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org