Como chamar um jFrame e permitir o acesso ao anterior

1 resposta
Ricelli_Martins

Fala Pessoal...

Eu gostaria de saber como faço para chamar um jframe
e permitir que o usuário tenha acesso ao jframe anterior.

Obs: Quando o usuário for acessar o jFrame anterior,
este deve abrir sobrepondo o Frame atual, e não fechando-o.

Espero que me ajudem....

Segue abaixo o código

import javax.swing.*;   
  
public class telaPrincipal extends javax.swing.JFrame {   
  
  
/** Creates new form telaPrincipal */   
public telaPrincipal() {   
initComponents();   
  
}   
  
  
private void ActionPerformed(java.awt.event.ActionEvent evt){   
// aqui nesta linha ele chama outro jFrame   
new cad_Cliente().show();   
}   
  
private void ActionPerformed(java.awt.event.ActionEvent evt) {   
System.exit(0);   
}   
  
/**  
* @param args the command line arguments  
*/   
public static void main(String args[]) {   
java.awt.EventQueue.invokeLater(new Runnable() {   
public void run() {   
new telaPrincipal().setVisible(true);   
  
}   
});   
}   
  
// Variables declaration - do not modify   
// End of variables declaration   
  
}

1 Resposta

Shelson

acredito q vc tenha q usar cardlayout.

Criado 23 de junho de 2008
Ultima resposta 6 de jul. de 2008
Respostas 1
Participantes 2