Creating a graph in Java
In general, you have some problems being consisten in your coding. 

1) Formatting: 

In your NodeGraph class you are not consistent in your indentation. Your createMatrx (which has a typo and should be called createMatrix) you are not using any indentation. 

2) Access modifiers: 

In your class Node2 you set your members private, as expected. 

In your class Node you don't specifically set the access modifier as private for some members, and you set them explicitly publbic for others. I would expect all members to be private. 

3) Naming: 

Single character variable names are not very descriptive. Name your variables according to their purpose.