netbeansimportjgrapht

import jgrapht package into my netbeans project


I am not knowing how to use the classes written in netbeans for one of my project . in which folder should i place the jgrapht package . will i have to write the import statement if yes then what do i write ?


Solution

  • say you've created a project named 'myproject'. now you want to use jgrapht package in that project. just do the following: under 'myproject' there are four sub-directories,

    1. Source Packages
    2. Test Packages
    3. Libraries
    4. Test Libraries

    'right click' on 'Libraries' directory. Now, a menu appears that offers

    1. Add Project
    2. Add Library
    3. Add jar/folder
    4. Properties

    select Add jar/folder. Now just locate where is your "jgrapht-jdk1.6.jar" file.

    hope it helps