why it returns null?
<p>I have 3 classes that I have written some part of them below.when i write`this statement in AddStudent class ,it will show abcd1234 which is the password, but when I write it in the MainFrame class it will return null.why???    (I send my management object from MainFrame to the AddStudent with AddStudent's constructor)   (<strong><em>I need the management object's information which is created in the AddStudent class in the mainframe )
what should I do?</em></strong></p>

<pre><code>management.getStudentsPassword();
</code></pre>

<p>my AddStudent class:</p>

<pre><code>public class AddStudent extends javax.swing.JDialog {

private SystemManagement management;


/** Creates new form AddStudent */
public AddStudent(java.awt.Frame parent, boolean modal, SystemManagement management) {
    super(parent, modal);
    initComponents();
    this.management = management;

}
</code></pre>

<p>my MainFrame class:</p>

<pre><code>public class MainFrame extends javax.swing.JFrame {

/** Creates new form MainFrame */
private SystemManagement management;
.
.
.}
</code></pre>

<p>my SystemManagement class:</p>

<pre><code>private String studentsPass;
...
public void setStudentspassword(String password){
studentsPass = password;
}
public String getStudentsPassword(){
return studentsPass;
}
</code></pre>
