JInternalFrame - Problemas para manipular informações

---------------------------------------------------------‘
| JButton1 | jButton2 | JButton3

JPanel1



JButton2 – botão de pesquisa ao clicar o layout fica assim:

---------------------------------------------------------‘
| JButton1 | jButton2 | JButton3

(JInternalFrame( opções de pesquisa)

JButton(fechar)

JPanel1(sua posição desce)


O problema é o seguinte, na primeira vez quando eu aperto o botão de pesquisa, funciona, a posição do jpanel1 desce e no seu lugar aparece um JInternalframe, mas quando eu clico no botão fechar, que muda para posição original do JPanel1 não funciona.

Código:
Classe Cliente :

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.Color;
import javax.swing.JDesktopPane;

public class Cliente extends JInternalFrame {

private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JLabel jLabelNome = null;
private JTextField jTextFieldNome = null;
private JPanel jPanel = null;
private JButton jButton1Incluir = null;
private JButton jButton3 = null;
private JPanel jPanel1 = null;
private JDesktopPane jDesktopPane = null;

public Cliente() {
	super();
	initialize();
}

private void initialize() {
	this.setSize(800, 600);
	this.setContentPane(getJContentPane());
	this.setTitle("Cadastrar/Editar - Cliente");
	this.setVisible(true); 
}

private JPanel getJContentPane() {
	if (jContentPane == null) {
		jLabelNome = new JLabel();
		jLabelNome.setBounds(new Rectangle(196, 25, 47, 20));
		jLabelNome.setText("Nome :");
		jContentPane = new JPanel();
		jContentPane.setLayout(null);
		jContentPane.setBackground(Color.white);
		jContentPane.add(getJPanel(), null);
		jContentPane.add(getJPanel1(), null);
		jContentPane.add(getJDesktopPane(), null);
	}return jContentPane;
}

private JTextField getJTextFieldNome() {
	if (jTextFieldNome == null) {
		jTextFieldNome = new JTextField(40);
		jTextFieldNome.setBounds(new Rectangle(245, 24, 350, 21));
		jTextFieldNome.setBackground(new Color(238, 238, 238));
		jTextFieldNome.setToolTipText("Digito aqui o nome do cliente. Ex: José da Silva ou Nome da Empresa LTDA.");
	}return jTextFieldNome;
}

private JPanel getJPanel() {
	if (jPanel == null) {
		jPanel = new JPanel();
		jPanel.setLayout(null);
		jPanel.setBounds(new Rectangle(0, 0, 791, 50));
		jPanel.setBackground(Color.white);
		jPanel.add(getJButton1Incluir(), null);
		jPanel.add(getJButton3(), null);
	}return jPanel;
}

private JButton getJButton1Incluir() {
	if (jButton1Incluir == null) {
		jButton1Incluir = new JButton();
		jButton1Incluir.setBounds(new Rectangle(0, 0, 106, 48));
		jButton1Incluir.setText("Incluir");
		jButton1Incluir.setToolTipText("Incluir Registro");
		jButton1Incluir.setBackground(Color.white);
	}return jButton1Incluir;
}

private JButton getJButton3() {
	if (jButton3 == null) {
		jButton3 = new JButton();
		jButton3.setBounds(new Rectangle(324, 0, 125, 48));
		jButton3.setBackground(Color.white);
		jButton3.setText("Consultar");
		jButton3.setToolTipText("Consultar");
		jButton3.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				ConsultaCliente cc = new ConsultaCliente();
				getJPanel1().setBounds(new Rectangle(0, 205, 790, 330));
				getJContentPane().add(getJDesktopPane(),null);
				getJDesktopPane().removeAll();
				getJDesktopPane().add(cc);
			}
		});
	}return jButton3;
}

private JPanel getJPanel1() {
	if (jPanel1 == null) {
		jPanel1 = new JPanel();
		jPanel1.setLayout(null);
		jPanel1.setBackground(Color.white);
		jPanel1.setBounds(new Rectangle(0, 48, 790, 330));
		jPanel1.add(jLabelNome, null);
		jPanel1.add(getJTextFieldNome(), null);
	}return jPanel1;
}

private JDesktopPane getJDesktopPane() {
	if (jDesktopPane == null) {
		jDesktopPane = new JDesktopPane();
		jDesktopPane.setBounds(new Rectangle(0, 51, 790, 155));
	}return jDesktopPane;
}
public void subir(){
	getJPanel1().setBounds(new Rectangle(0, 48, 790, 330));		
}
public static void main(String args[]){
Cliente cliente = new Cliente();	
}	

}

--------------------Classe da pesequisa(JInternal Frame)

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.Color;
import javax.swing.JDesktopPane;

public class Cliente extends JInternalFrame {

private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JLabel jLabelNome = null;
private JTextField jTextFieldNome = null;
private JPanel jPanel = null;
private JButton jButton1Incluir = null;
private JButton jButton3 = null;
private JPanel jPanel1 = null;
private JDesktopPane jDesktopPane = null;

public Cliente() {
	super();
	initialize();
}

private void initialize() {
	this.setSize(800, 600);
	this.setContentPane(getJContentPane());
	this.setTitle("Cadastrar/Editar - Cliente");
	this.setVisible(true); 
}

private JPanel getJContentPane() {
	if (jContentPane == null) {
		jLabelNome = new JLabel();
		jLabelNome.setBounds(new Rectangle(196, 25, 47, 20));
		jLabelNome.setText("Nome :");
		jContentPane = new JPanel();
		jContentPane.setLayout(null);
		jContentPane.setBackground(Color.white);
		jContentPane.add(getJPanel(), null);
		jContentPane.add(getJPanel1(), null);
		jContentPane.add(getJDesktopPane(), null);
	}return jContentPane;
}

private JTextField getJTextFieldNome() {
	if (jTextFieldNome == null) {
		jTextFieldNome = new JTextField(40);
		jTextFieldNome.setBounds(new Rectangle(245, 24, 350, 21));
		jTextFieldNome.setBackground(new Color(238, 238, 238));
		jTextFieldNome.setToolTipText("Digito aqui o nome do cliente. Ex: José da Silva ou Nome da Empresa LTDA.");
	}return jTextFieldNome;
}

private JPanel getJPanel() {
	if (jPanel == null) {
		jPanel = new JPanel();
		jPanel.setLayout(null);
		jPanel.setBounds(new Rectangle(0, 0, 791, 50));
		jPanel.setBackground(Color.white);
		jPanel.add(getJButton1Incluir(), null);
		jPanel.add(getJButton3(), null);
	}return jPanel;
}

private JButton getJButton1Incluir() {
	if (jButton1Incluir == null) {
		jButton1Incluir = new JButton();
		jButton1Incluir.setBounds(new Rectangle(0, 0, 106, 48));
		jButton1Incluir.setText("Incluir");
		jButton1Incluir.setToolTipText("Incluir Registro");
		jButton1Incluir.setBackground(Color.white);
	}return jButton1Incluir;
}

private JButton getJButton3() {
	if (jButton3 == null) {
		jButton3 = new JButton();
		jButton3.setBounds(new Rectangle(324, 0, 125, 48));
		jButton3.setBackground(Color.white);
		jButton3.setText("Consultar");
		jButton3.setToolTipText("Consultar");
		jButton3.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				ConsultaCliente cc = new ConsultaCliente();
				getJPanel1().setBounds(new Rectangle(0, 205, 790, 330));
				getJContentPane().add(getJDesktopPane(),null);
				getJDesktopPane().removeAll();
				getJDesktopPane().add(cc);
			}
		});
	}return jButton3;
}

private JPanel getJPanel1() {
	if (jPanel1 == null) {
		jPanel1 = new JPanel();
		jPanel1.setLayout(null);
		jPanel1.setBackground(Color.white);
		jPanel1.setBounds(new Rectangle(0, 48, 790, 330));
		jPanel1.add(jLabelNome, null);
		jPanel1.add(getJTextFieldNome(), null);
	}return jPanel1;
}

private JDesktopPane getJDesktopPane() {
	if (jDesktopPane == null) {
		jDesktopPane = new JDesktopPane();
		jDesktopPane.setBounds(new Rectangle(0, 51, 790, 155));
	}return jDesktopPane;
}
public void subir(){
	getJPanel1().setBounds(new Rectangle(0, 48, 790, 330));		
}
public static void main(String args[]){
Cliente cliente = new Cliente();	
	
}	

}

Boa noite!

:?: Acho que você so mandou uma classe… mais beleza…

Você está mudando o textField de lugar com “getJPanel1().setBounds(new Rectangle(0, 205, 790, 330));”, acho que o correto seria chamar uma outra janela para a pesquisa.

Para trazer ele para o lugar anterior sete os valore corretos…

De uma olhada nestes tutoriais…
http://www.guj.com.br/java.tutorial.artigo.38.1.guj

http://www.portaljava.com/home/modules.php?name=Content&pa=list_pages_categories&cid=14

Obrigado pela dica, eu passei as duas classes separada por um traço assim:-----------------------------
Eu passei esta pergunta porque o meu maior problema com essas duas classes e passar informções de um para a outra, por exemplo a classe do JInternalFrame e resposável por fazer a pesquisa(SQL) e jogar em um JList, desse JLista eu escolho o valor clico em Ok e ele joga todos os valores para a classe que extende o JFrame, fiz a minha logica mas mesmo assim a informação não esta sendo passada, o que eu fiz de errado.

Logica para esse sistema é a seguinte: Pega o valores da Classe ClienteConsulta (JInternalFrame) joga numa classe de persistência e chama um metodo da classe Cliente(JFrame) que tem a função de coletar essas informações e jogar na mesma em seus jTextFields, como passar as informações do campo de uma para a outra?

Quem tiver interessado eu passo as classes por e-mail, so postar aqui o e-mail, pois elas são muito grandes, essas classes que eu coloquei no topico esta bem resumida.
Obrigado