LexarG56

Generation

generate functionThu, 20 Jul 2023

JComboBox con 5 model en un ActionPerformed para un boton registrar

private void btnRegistrarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String nombre = txtNombre.getText(); String apellido = txtApellido.getText(); String direccion = txtDireccion.getText(); String telefono = txtTelefono.getText(); String email = txtEmail.getText(); String tipoSangre = cmbTipoSangre.getSelectedItem().toString(); String sexo = ""; if (rbtHombre.isSelected()) { sexo = "Hombre"; } else if (rbtMujer.isSelected()) { sexo = "Mujer"; } String fechaNacimiento = txtFechaNacimiento.getText(); Persona p = new Persona(nombre, apellido, direccion, telef

Questions about programming?Chat with your personal AI assistant