Código ":
Ver original
private void comboBoxItemStateChanged(java.awt.event.ItemEvent evt){ if(evt.getStateChange() == ItemEvent.SELECTED){ if(comboBox.getSelectedIndex()>0){ comboBox_1.setModel(new DefaultComboBoxModel(getDocNombres(comboBox.getSelectedItem().toString()))); } } }
Código Java:
Necesito ayuda urgente, no me queda mucho tiempo!! Ver original
if(comboBox.equalsIgnoreCase("Alergista")){ DocNombres[0] = "Pedro Silva"; DocNombres[1] = "Daniel Paez"; } if(comboBox.equalsIgnoreCase("Cardiolog\u00EDa")){ DocNombres[0] = "Luciano Ferreira"; DocNombres[1] = "Lucas Rodriguez"; } if(comboBox.equalsIgnoreCase("Cardiolog\u00EDa Infantil")){ DocNombres[0] = "Silvana Gomez"; DocNombres[1] = "Florencia Viera"; } if(comboBox.equalsIgnoreCase("Dermatolog\u00EDa")){ DocNombres[0] = "Silvana Gomez"; DocNombres[1] = "Florencia Viera"; } if(comboBox.equalsIgnoreCase("Diabetolog\u00EDa")){ DocNombres[0] = "Hernesto Fernandez"; DocNombres[1] = "Facundo Zorrilla"; } if(comboBox.equalsIgnoreCase("Endocrinolog\u00EDa")){ DocNombres[0] = "Cesar Gutierrez"; DocNombres[1] = "Mart\u00EDn Gomez"; } if(comboBox.equalsIgnoreCase("Enfermedades Infecciosas")){ DocNombres[0] = "Ana Clara"; DocNombres[1] = "Pedro Gonzalez"; } if(comboBox.equalsIgnoreCase("Gastroenterolog\u00EDa")){ DocNombres[0] = "Dalton Pereira"; DocNombres[1] = "Mart\u00EDn Allende"; } if(comboBox.equalsIgnoreCase("Gastroenterolog\u00EDa Infantil")){ DocNombres[0] = "Matteo Acevedo"; DocNombres[1] = "Valeria Garcia"; } if(comboBox.equalsIgnoreCase("Geriag\u00EDa")){ DocNombres[0] = "Fabian Sanchez"; DocNombres[1] = "Michael Aguirre"; } if(comboBox.equalsIgnoreCase("Ginecolog\u00EDa y Obstetracia")){ DocNombres[0] = "Flavio Calleja"; DocNombres[1] = "Felix Borras"; } if(comboBox.equalsIgnoreCase("Hematolog\u00EDa Cl\u00EDnica")){ DocNombres[0] = "Federico Acevedo"; DocNombres[1] = "Adrian Fierro"; } if(comboBox.equalsIgnoreCase("Medicina General")){ DocNombres[0] = "Fabricio Laudano"; DocNombres[1] = "Hernan Fernandez"; } if(comboBox.equalsIgnoreCase("Nefrolog\u00EDa")){ DocNombres[0] = "Ana Flor"; DocNombres[1] = "Bianca Alonso"; } if(comboBox.equalsIgnoreCase("Neurolog\u00EDa")){ DocNombres[0] = "Alan Par"; DocNombres[1] = "Mart\u00EDn Huerta"; } if(comboBox.equalsIgnoreCase("Neuropediatr\u00EDa")){ DocNombres[0] = "Alan Par"; DocNombres[1] = "Mart\u00EDn Huerta"; } if(comboBox.equalsIgnoreCase("Odontolog\u00EDa")){ DocNombres[0] = "Victor Larrañaga"; DocNombres[1] = "Laura Capriccio"; } if(comboBox.equalsIgnoreCase("Oftalmolog\u00EDa")){ DocNombres[0] = "Victoria Menendez"; DocNombres[1] = "Tabare Alvarez"; } if(comboBox.equalsIgnoreCase("Otologo")){ DocNombres[0] = "Mart\u00EDn Ruiz"; DocNombres[1] = "Adriana Barreiro"; } if(comboBox.equalsIgnoreCase("Otorrinolaringolog\u00EDa")){ DocNombres[0] = "Daniel Rodriguez"; DocNombres[1] = "Tito Fernandez"; } return DocNombres; } }