Java controls in one class not editing with method calls from another class on doClick() method
<p>I am trying to populate some controls in a class from actions in another by saving a string in a JLabel then use the doClick() method to trigger an invisible button to get that string  to populate the controls in the other class. I have Outputted the string after the button click in the other class and see what is saved in the label but it doesnt populate the controls. I have setup a visible button in the next class on the panel with the same action event but when it is clicked it outputs "" for the Jlabel text.</p>

<pre><code>//method from  first class 
public void SetupView(String selection)
    {            
       this.count=0; 
        ResultSet result;  

        try
        {    
            result=this.GetNames();
            while(result.next())
            {   
                this.Names=this.GetPeople(result.getString("Name_Id"));
                while(Names.size()&gt;this.count)
                {                  
                    if(selection.compareTo(result.getString("Name"))==0 || selection.compareTo("Parish")==0||selection.compareTo(Names.get(count).substring(0, Names.get(count).indexOf('-')))==0)
                    {
                       throw new Exception("Expand All Nodes and Select an ID");                       
                    }
                    this.count++;
                }
                this.count=0;
            }                
            result.close();  
            this.viewPeoplePanel.TemporaryLabel.setText(selection);
            this.viewPeoplePanel.ViewButton.doClick();

        }            
        catch(Exception ex)
        {
           JOptionPane.showMessageDialog(null,ex.getMessage());
           this.count=0;
        }   

    }

//Constructor Second class
public ViewPeoplePanel()
    {            
        this.Setup();
        this.add(TemporaryLabel);
        this.add(ViewButton);
        ViewButton.setVisible(false);
        TemporaryLabel.setVisible(false);
        ViewButton.addActionListener(new ActionListener() {              
        public void actionPerformed(ActionEvent evt) 
        {
            JOptionPane.showMessageDialog(null,TemporaryLabel.getText());                    

            FirstNameField.setEditable(true);           
            SurnameField.setEditable(true);
            GenderField.setEditable(true);
            DateOfBirthField.setEditable(true);
            RelationshipStatusField.setEditable(true);                
            FirstNameField.setText("Bullet");
        }
        });
        EditButton.addActionListener(new ActionListener() { 
        public void actionPerformed(ActionEvent evt) 
        {
            JOptionPane.showMessageDialog(null,TemporaryLabel.getText()); 
            FirstNameField.setEditable(true);           
            SurnameField.setEditable(true);
            GenderField.setEditable(true);
            DateOfBirthField.setEditable(true);
            RelationshipStatusField.setEditable(true);                
            FirstNameField.setText("Bullet");
        }
        });
</code></pre>

<p>that is the constructor of the other class. the class extends JPanel and all the controls but ViewButton and TemporaryLabel were added components via GroupLayout. When i click the edit button manually on the panel it does everything but except showing what selection is for the viewbutton when i programatically click it it shows me what selection is but does not restructure the controls. If someone could help me with understanding what the problem is i would be grateful.</p>
