[I am writing a program with two classes, the main class with two panel separeted by a splitpane, In the action listening part of the main class, Ican i pass the second panel as an arguement to the second class that fetches the content of a database, attach it to the panel an display the content in the main class. When i run the program, the content is not updated in the main class, Why]

[From the main class]
if(e.getSource()==executeb){
//Executing Engine here
executequery();

}

public void executequery(){
String firstword="";
try{
//JOptionPane.showMessageDialog(this, "Not a recognise Query pattern", "Error", JOptionPane.ERROR_MESSAGE);
firstword = returnFirstWord(textArea.getText());
}catch(Exception ex){
System.out.println("Error occured due to "+ex.getMessage());
}
//test if is a memeber instead
//Descide if its an SQL query or NOSQL querry pattern
if(firstword.equalsIgnoreCase("select") || firstword.equalsIgnoreCase("create") || firstword.equalsIgnoreCase("insert") || firstword.equalsIgnoreCase("update") || firstword.equalsIgnoreCase("delete") || firstword.equalsIgnoreCase("alter")){
try{
MySQLController mysql = new MySQLController(firstword,resultpanel,textArea.get Text());
System.out.println("i am executing this application");
}catch(Exception ex){
System.out.println("Error occured due to "+ex.getMessage());
}
}else if(firstword.equalsIgnoreCase("set") || firstword.equalsIgnoreCase("get")){
CauchController cc = new CauchController(textArea.getText(),resultpanel,fir stword);
}else
JOptionPane.showMessageDialog(this, "This doe not belong to either mysq or cauchbase querry", "Error", JOptionPane.ERROR_MESSAGE);
}


[the resultpanel in the MySQLController class was defined in this main to contain the result, passed as an argument to MySQLController to add other components then expected to be visible on the main class]. is that not possible?