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?)
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.