private void jComboBoxTransporteEntradaItemStateChanged(java.awt.event.ItemEvent evt) {
// TODO add your handling code here:
System.out.println("1");
if(jComboBoxTransporteEntrada.getSelectedItem().equals("Sea")) {
System.out.println("3");
this.jComboBoxTransDetEntrada.removeAllItems();
this.jComboBoxTransDetEntrada.addItem("");
this.jComboBoxTransDetEntrada.addItem("CNT20");
this.jComboBoxTransDetEntrada.addItem("CNT40");
this.jComboBoxTransDetEntrada.addItem("LCL");
}else if(jComboBoxTransporteEntrada.getSelectedItem().equals("Air")){
System.out.println("2");
this.jComboBoxTransDetEntrada.removeAllItems();
this.jComboBoxTransDetEntrada.addItem("");
this.jComboBoxTransDetEntrada.addItem("GRU");
this.jComboBoxTransDetEntrada.addItem("GIG");
this.jComboBoxTransDetEntrada.addItem("VCP");
this.jComboBoxTransDetEntrada.addItem("OTHER");
}
// this.setValuesToTransportDetailsComboBox();
}
private void setValuesToTransportDetailsComboBox() {
System.out.println("1");
if(jComboBoxTransporteEntrada.getSelectedItem().equals("Sea")) {
this.jComboBoxTransDetEntrada.removeAllItems();
this.jComboBoxTransDetEntrada.addItem("");
this.jComboBoxTransDetEntrada.addItem("CNT20");
this.jComboBoxTransDetEntrada.addItem("CNT40");
this.jComboBoxTransDetEntrada.addItem("LCL");
}
if(jComboBoxTransporteEntrada.getSelectedItem().equals("Air")){
System.out.println("2");
this.jComboBoxTransDetEntrada.removeAllItems();
this.jComboBoxTransDetEntrada.addItem("");
this.jComboBoxTransDetEntrada.addItem("GRU");
this.jComboBoxTransDetEntrada.addItem("GIG");
this.jComboBoxTransDetEntrada.addItem("VCP");
this.jComboBoxTransDetEntrada.addItem("OTHER");
}
}
Agradeço desde já.
Sandra Haine