Results 1 to 4 of 4
Thread: Importing Packages
- 12-28-2010, 06:58 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 8
- Rep Power
- 0
Importing Packages
Hello.
A few weeks ago, I started a side project, and it pretty quickly grew out of hand. Long story short, I needed to separate a few of my files into separate packages for neater organization. I have one package that most of my files are in (which my NetBeans IDE refers to as <default package>), and I have a side package called CharClassTypes.
Each class in CharClassTypes extends a class called PlayerCharacter inside the default package...or at least that was my plan. I'm having trouble finding the right line to import the default package in the subclasses.
I know how to import normal API classes, because they mostly are of the form java.something.somethingElse. But what form should I use in this case?
- 12-28-2010, 07:04 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
The default package doesn't have a name so it's hard to import from.
Move everything from the default package into a newly created package (with a name). NB should let you do this by dragging and dropping.
- 12-28-2010, 07:19 PM #3
Member
- Join Date
- Aug 2010
- Posts
- 8
- Rep Power
- 0
Thanks for the suggestion. Worked out beautifully.
- 12-28-2010, 07:48 PM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,561
- Rep Power
- 11
Similar Threads
-
importing packages
By mustachMan in forum New To JavaReplies: 3Last Post: 01-20-2010, 05:07 AM -
help with importing packages
By orrymr in forum New To JavaReplies: 1Last Post: 08-07-2009, 08:18 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


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks