Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
Hello
I am new to Java . I am trying to develop a GUI using swings , but I am getting the error "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" while running the program I am trying to use Jtree to open folders stored in hard disk in tree format .
its pointing the exception error in the following line of code
cp.setLayout(new BoxLayout(cp, BoxLayout.X_AXIS));
(java.lang.NullPointerException).
Please help me regarding the same Thanks in advance