In IDE: NetBeans: i am having issue in calling new form after performing an action. Below is the line of code
protected void onFindTrans_FindGetButtonAction(Component c, ActionEvent event) {
final String findName = findFindTranNameComboBox(c.getComponentForm()).getSelectedItem().toString();
final String findPort = findFindTranPortComboBox(c.getComponentForm()).getSelectedItem().toString();
final String findSour = findFindSourceTextField(c.getComponentForm()).getText();
final String findDest = findFindDestinateTextField(c.getComponentForm()).getText();
final String findStat = findFindStationTextField(c.getComponentForm()).getText();
final String findDate = findFindDatePicker(c.getComponentForm()).getText();
final Boolean findCheck = (Boolean)findFindCheckBox(c.getComponentForm()).isSelected();
if (("".equals(findName)) || ("".equals(findPort)) || ("".equals(findSour)) || ("".equals(findDest)) || ("".equals(findDate))) {
Dialog.show("Error", "All fields are required", "OK", null);
}
else{
if(findFindCheckBox(c.getComponentForm()).isSelected()){
if(!"".equals(findStat)){
finCheck = "TRUE";
findTran(findName,findPort,findSour,findDest,findStat,findDate,finCheck);
showForm("Main", null);
} else {
finCheck = "TRUE";
finStat = "NONE";
findTran(findName,findPort,findSour,findDest,finStat,findDate,finCheck);
showForm("Main", null);
}
}else{
if(!findFindCheckBox(c.getComponentForm()).isSelected()){
if(!"".equals(findStat)){
finCheck = "FALSE";
findTran(findName,findPort,findSour,findDest,findStat,findDate,finCheck);
showForm("Main", null);
} else {
finCheck = "FALSE";
finStat = "NONE";
findTran(findName,findPort,findSour,findDest,finStat,findDate,finCheck);
showForm("Main", null);
}
}
}
}
}