Results 1 to 2 of 2
Thread: help with importing packages
- 08-07-2009, 07:10 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
help with importing packages
Hi,
I created a simple program where I wanted to use the GeneralPath class which is found in java.awt.geom.GeneralPath. At first I only imported java.awt.*, but when my program couldn't compile, I explicitly imported java.awt.geom.GeneralPath. When I did this, my program worked without any problems. My question is, why did I have to explicitly import this class, when the .* at the end of java.awt refers to all of it's sub-packages and subclasses? Surely it should also include the GeneralPath class?
Thanks in advance :)
- 08-07-2009, 08:18 PM #2
because importing awt.* does not import awt.geom.*
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
Similar Threads
-
Importing JXL API
By ryanlbowen in forum New To JavaReplies: 0Last Post: 07-17-2009, 07:17 PM -
importing packages at the same level
By Bharat in forum New To JavaReplies: 3Last Post: 03-30-2009, 03:17 AM -
importing external packages
By bubbles in forum New To JavaReplies: 3Last Post: 01-20-2009, 11:42 PM -
Importing packages from the packages within same application.
By sta2003 in forum New To JavaReplies: 3Last Post: 02-12-2008, 11:03 AM -
Using packages
By prfalco in forum New To JavaReplies: 5Last Post: 01-31-2008, 10:38 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks