Estou Fazendo Um Programa Em Swing, De Média Escolar, Onde A Pessoa Coloca O Nome Do Aluno E As 3 Notas, Eu Coloquei Um Botão Com O Nome “Confirmar”, Quando A Pessoa Confirmar As 3 Notas Abre Um Novo JFrame Com A Média E O Nome Do Aluno!
Então Como Faço Pra Aparecer O Nome E A Média Do Aluno Aparecer No Outro JFrame? Aqui Vai O Começo Do Código!
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String nome = txtNome.getText();
int nota1 = Integer.parseInt(noTa1.getText());
int nota2 = Integer.parseInt(noTa2.getText());
int nota3 = Integer.parseInt(noTa3.getText());
int total = (nota1 + nota2 + nota3) / 3;
}
Adendo:
Eu Tenho Dois JFrames E Uma Classe Em Java! Sem Código Pois Não Sei o Que Fazer!!