Results 1 to 2 of 2
- 04-02-2012, 11:28 PM #1
Member
- Join Date
- Apr 2012
- Posts
- 1
- Rep Power
- 0
How to find which packages are still needed to be imported in a class?
Using netbeans 7.1.1
Suppose I have the following at the top of my class file
import javax.swing.*;
import java.awt.*; //needed for Graphics class inclusion
import javax.imageio.*; //needed for ImageIO
import java.awt.image.*; //needed for BufferedImage
import java.io.*; //needed for File
and later on, I delete some code from the source and wanted to find out if I still need to import all of the above packages or not (for example, I could have removed code that uses Java.io, so I reallly do not need to import it any more).
Is there a way in netbeans IDE to ask it to check if all imports are still needed? I am new at it and searched but could not find a way so far.
thanks,
Robert
opps. Please IGNORE. I see that the IDE has a hint on the side of the import statement that says that the import is not needed.
Please ignore this post (how does one delete a post here?)Last edited by h_robert64; 04-02-2012 at 11:35 PM.
- 04-03-2012, 09:29 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: How to find which packages are still needed to be imported in a class?
It works even better if you only import the actual classes you are using, which is the recommended way of doing things.
And deleting posts sort of negates one of the purposes of the forum, which is as a repository of questions and answers.Please do not ask for code as refusal often offends.
Similar Threads
-
How to find java packages
By h.ghorashi in forum New To JavaReplies: 1Last Post: 02-16-2011, 06:03 PM -
Default imported packages
By Himanshu23 in forum Java SoftwareReplies: 2Last Post: 01-11-2011, 06:20 AM -
show the comment in the imported class
By javastuden in forum New To JavaReplies: 5Last Post: 08-31-2010, 10:37 AM -
classes and packages needed to connect any mailserver
By nyk976 in forum NetworkingReplies: 1Last Post: 02-10-2010, 12:55 AM -
Need to find large files and folder on the PC. What app needed?
By Cleaner007 in forum Reviews / AdvertisingReplies: 1Last Post: 09-30-2008, 07:06 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks