Results 1 to 2 of 2
  1. #1
    h_robert64 is offline Member
    Join Date
    Apr 2012
    Rep Power

    Default 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*; //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, 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.



    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.

  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Rep Power

    Default 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.

    ** This space for rent **

Similar Threads

  1. How to find java packages
    By h.ghorashi in forum New To Java
    Replies: 1
    Last Post: 02-16-2011, 07:03 PM
  2. Default imported packages
    By Himanshu23 in forum Java Software
    Replies: 2
    Last Post: 01-11-2011, 07:20 AM
  3. show the comment in the imported class
    By javastuden in forum New To Java
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  4. Replies: 1
    Last Post: 02-10-2010, 01:55 AM
  5. Need to find large files and folder on the PC. What app needed?
    By Cleaner007 in forum Reviews / Advertising
    Replies: 1
    Last Post: 09-30-2008, 07:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts