My JDialog throws a NullPointerException when I access it through Jframe but works fine when I run the JDialog class itself.
I have a jMenuItem called "modify" in my jFrame that accesses jDialog.
private void modifyActionPerformed(java.awt.event.ActionEvent evt){
Modify mod = new Modify(this,true); //"Modify" is my jDialog class name.
mod.setVisible(true);
}
Modify throws a NullPointerException when I query the database when I access the dialog from jframe but I can query the database successfully from Modify when I run the class itself.